Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
sudo apt-get install -y --force-yes -qq libmpich-dev libgsl0-dbg libgsl0-dev
- name: Cache HDF5
id: h5cache
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: hdf5-1.8.21-parallel
with:
Expand All @@ -40,7 +40,7 @@ jobs:
make -s install
- name: Cache Python
id: pycache
uses: actions/cache@v2
uses: actions/cache@v4
env:
cache-name: miniconda
with:
Expand Down
7 changes: 5 additions & 2 deletions script/analysis/hdf5_to_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,15 @@ def load_sadw(fname):
d[k] = v[()]
return t,sadw,sph,zoh

def load_diag(path, hdr = None, nulegacy = False, timers = True):
def load_diag(path, hdr = None, nulegacy = False, timers = True, twod = False):
import numpy as np

# load header
if hdr is None:
dfiles = sorted(glob.glob(os.path.join(path,'dump_*.h5')))
if twod:
dfiles = sorted(glob.glob(os.path.join(path,'dump2d_*.h5')))
else:
dfiles = sorted(glob.glob(os.path.join(path,'dump_*.h5')))
if len(dfiles) < 1:
import util
util.warn("Cannot read header. No dumps available.")
Expand Down
7 changes: 6 additions & 1 deletion script/analysis/movie.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@
type=int,
help=('Number of parallel processe to use. '
+'If not set, defaults to all available cores.'))
parser.add_argument('--twod',
dest='twod',
default=False,
action='store_true',
help=('For 2d dump files'))


args = parser.parse_args()
Expand All @@ -79,7 +84,7 @@
util.safe_remove(tmpdir)
os.mkdir(tmpdir)

dfnams = io.get_dumps_full(dfold)
dfnams = io.get_dumps_full(dfold, twod=args.twod)
hdr = io.load_hdr(dfnams[0])
geom = io.load_geom(hdr)
num_files = len(dfnams)
Expand Down