From d708e0d7b7570e3e263cd583229565b74dad63dc Mon Sep 17 00:00:00 2001 From: Marko Ristic Date: Thu, 14 Aug 2025 14:00:29 -0600 Subject: [PATCH 1/4] hdf5_to_dict.py: add twod flag to load_diag --- script/analysis/hdf5_to_dict.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/script/analysis/hdf5_to_dict.py b/script/analysis/hdf5_to_dict.py index a5be388..1370c0d 100644 --- a/script/analysis/hdf5_to_dict.py +++ b/script/analysis/hdf5_to_dict.py @@ -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.") From 1f6d3a5357f75514815d6c0c3d15ae231e890ee4 Mon Sep 17 00:00:00 2001 From: Marko Ristic Date: Thu, 14 Aug 2025 14:00:53 -0600 Subject: [PATCH 2/4] movie.py: add twod flag for 2-D movie support --- script/analysis/movie.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/analysis/movie.py b/script/analysis/movie.py index 1d63c09..3da7cd4 100755 --- a/script/analysis/movie.py +++ b/script/analysis/movie.py @@ -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() @@ -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) From 092c116a9402a95df81c6139f637c1bf40ab23e5 Mon Sep 17 00:00:00 2001 From: Marko Ristic Date: Thu, 14 Aug 2025 14:23:26 -0600 Subject: [PATCH 3/4] update CI to use actions/cache@v4 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dd68e0c..d8e9538 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: From 2380b21b19a27407d5d557e367ac2c1109cccd27 Mon Sep 17 00:00:00 2001 From: Marko Ristic Date: Thu, 14 Aug 2025 14:28:39 -0600 Subject: [PATCH 4/4] update cached Python to also use actions/cache@v4 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d8e9538..85d6f61 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: