From 2ae1449847c6128b43367e13df74c1ad997e010f Mon Sep 17 00:00:00 2001 From: Oliver Jahn Date: Wed, 15 May 2024 19:54:16 -0400 Subject: [PATCH] Eliminate subdirectories --- .github/workflows/build_testing.yml | 4 ++-- .../landStDiag.0000000000.txt | 0 .../thSIceStDiag.0000036000.txt | 0 .../dynStDiag.0000025920.txt | 0 .../{run/mnc_test_0001 => }/grid.cdl | 0 .../{run/mnc_test_0001 => }/grid.md5 | 0 .../{run/mnc_test_0001 => }/oceDiag.0000072000.cdl | 0 .../{run/mnc_test_0001 => }/oceDiag.0000072000.md5 | 0 .../{run/mnc_test_0001 => }/phiHyd.0000072000.cdl | 0 .../{run/mnc_test_0001 => }/phiHyd.0000072000.md5 | 0 .../{run/mnc_test_0001 => }/phiHydLow.0000072000.cdl | 0 .../{run/mnc_test_0001 => }/phiHydLow.0000072000.md5 | 0 .../{run/mnc_test_0001 => }/state.0000072000.cdl | 0 .../{run/mnc_test_0001 => }/state.0000072000.md5 | 0 utils/python/MITgcmutils/tests/run-scripts | 10 +++++----- utils/python/MITgcmutils/tests/test_cs.py | 10 +++++----- utils/python/MITgcmutils/tests/test_diagnostics.py | 6 +++--- utils/python/MITgcmutils/tests/test_mnc.py | 4 ++-- 18 files changed, 17 insertions(+), 17 deletions(-) rename utils/python/MITgcmutils/tests/diagstats/{aim.5l_cs/tr_run.thSI => aim.5l_cs.thSI}/landStDiag.0000000000.txt (100%) rename utils/python/MITgcmutils/tests/diagstats/{global_ocean.cs32x15/tr_run.thsice => global_ocean.cs32x15.thsice}/thSIceStDiag.0000036000.txt (100%) rename utils/python/MITgcmutils/tests/diagstats/{hs94.cs-32x32x5/tr_run.impIGW => hs94.cs-32x32x5.impIGW}/dynStDiag.0000025920.txt (100%) rename utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/{run/mnc_test_0001 => }/grid.cdl (100%) rename utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/{run/mnc_test_0001 => }/grid.md5 (100%) rename utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/{run/mnc_test_0001 => }/oceDiag.0000072000.cdl (100%) rename utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/{run/mnc_test_0001 => }/oceDiag.0000072000.md5 (100%) rename utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/{run/mnc_test_0001 => }/phiHyd.0000072000.cdl (100%) rename utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/{run/mnc_test_0001 => }/phiHyd.0000072000.md5 (100%) rename utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/{run/mnc_test_0001 => }/phiHydLow.0000072000.cdl (100%) rename utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/{run/mnc_test_0001 => }/phiHydLow.0000072000.md5 (100%) rename utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/{run/mnc_test_0001 => }/state.0000072000.cdl (100%) rename utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/{run/mnc_test_0001 => }/state.0000072000.md5 (100%) diff --git a/.github/workflows/build_testing.yml b/.github/workflows/build_testing.yml index 8113ce7c66..9681fcfae8 100644 --- a/.github/workflows/build_testing.yml +++ b/.github/workflows/build_testing.yml @@ -102,11 +102,11 @@ jobs: - name: Download mnc test data uses: wei/curl@v1.1.1 with: - args: https://engaging-web.mit.edu/~jahn/MITgcmutils/global_ocean.cs32x15/run/mnc_test_0001/{oceDiag,state,phiHyd,phiHydLow}.0000072000.t0{01,02,03,04,05,06,07,08,09,10,11,12}.nc -o utils/python/MITgcmutils/tests/data/global_ocean.cs32x15/run/mnc_test_0001/#1.0000072000.t0#2.nc + args: https://engaging-web.mit.edu/~jahn/MITgcmutils/global_ocean.cs32x15/{oceDiag,state,phiHyd,phiHydLow}.0000072000.t0{01,02,03,04,05,06,07,08,09,10,11,12}.nc -o utils/python/MITgcmutils/tests/data/global_ocean.cs32x15/#1.0000072000.t0#2.nc - name: Download mnc grid data uses: wei/curl@v1.1.1 with: - args: https://engaging-web.mit.edu/~jahn/MITgcmutils/global_ocean.cs32x15/run/mnc_test_0001/grid.t0{01,02,03,04,05,06,07,08,09,10,11,12}.nc -o utils/python/MITgcmutils/tests/data/global_ocean.cs32x15/run/mnc_test_0001/grid.t0#1.nc + args: https://engaging-web.mit.edu/~jahn/MITgcmutils/global_ocean.cs32x15/grid.t0{01,02,03,04,05,06,07,08,09,10,11,12}.nc -o utils/python/MITgcmutils/tests/data/global_ocean.cs32x15/grid.t0#1.nc - name: Run Tox run: tox -e ${{ matrix.env }} working-directory: utils/python/MITgcmutils diff --git a/utils/python/MITgcmutils/tests/diagstats/aim.5l_cs/tr_run.thSI/landStDiag.0000000000.txt b/utils/python/MITgcmutils/tests/diagstats/aim.5l_cs.thSI/landStDiag.0000000000.txt similarity index 100% rename from utils/python/MITgcmutils/tests/diagstats/aim.5l_cs/tr_run.thSI/landStDiag.0000000000.txt rename to utils/python/MITgcmutils/tests/diagstats/aim.5l_cs.thSI/landStDiag.0000000000.txt diff --git a/utils/python/MITgcmutils/tests/diagstats/global_ocean.cs32x15/tr_run.thsice/thSIceStDiag.0000036000.txt b/utils/python/MITgcmutils/tests/diagstats/global_ocean.cs32x15.thsice/thSIceStDiag.0000036000.txt similarity index 100% rename from utils/python/MITgcmutils/tests/diagstats/global_ocean.cs32x15/tr_run.thsice/thSIceStDiag.0000036000.txt rename to utils/python/MITgcmutils/tests/diagstats/global_ocean.cs32x15.thsice/thSIceStDiag.0000036000.txt diff --git a/utils/python/MITgcmutils/tests/diagstats/hs94.cs-32x32x5/tr_run.impIGW/dynStDiag.0000025920.txt b/utils/python/MITgcmutils/tests/diagstats/hs94.cs-32x32x5.impIGW/dynStDiag.0000025920.txt similarity index 100% rename from utils/python/MITgcmutils/tests/diagstats/hs94.cs-32x32x5/tr_run.impIGW/dynStDiag.0000025920.txt rename to utils/python/MITgcmutils/tests/diagstats/hs94.cs-32x32x5.impIGW/dynStDiag.0000025920.txt diff --git a/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/grid.cdl b/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/grid.cdl similarity index 100% rename from utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/grid.cdl rename to utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/grid.cdl diff --git a/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/grid.md5 b/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/grid.md5 similarity index 100% rename from utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/grid.md5 rename to utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/grid.md5 diff --git a/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/oceDiag.0000072000.cdl b/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/oceDiag.0000072000.cdl similarity index 100% rename from utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/oceDiag.0000072000.cdl rename to utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/oceDiag.0000072000.cdl diff --git a/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/oceDiag.0000072000.md5 b/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/oceDiag.0000072000.md5 similarity index 100% rename from utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/oceDiag.0000072000.md5 rename to utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/oceDiag.0000072000.md5 diff --git a/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/phiHyd.0000072000.cdl b/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/phiHyd.0000072000.cdl similarity index 100% rename from utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/phiHyd.0000072000.cdl rename to utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/phiHyd.0000072000.cdl diff --git a/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/phiHyd.0000072000.md5 b/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/phiHyd.0000072000.md5 similarity index 100% rename from utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/phiHyd.0000072000.md5 rename to utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/phiHyd.0000072000.md5 diff --git a/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/phiHydLow.0000072000.cdl b/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/phiHydLow.0000072000.cdl similarity index 100% rename from utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/phiHydLow.0000072000.cdl rename to utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/phiHydLow.0000072000.cdl diff --git a/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/phiHydLow.0000072000.md5 b/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/phiHydLow.0000072000.md5 similarity index 100% rename from utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/phiHydLow.0000072000.md5 rename to utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/phiHydLow.0000072000.md5 diff --git a/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/state.0000072000.cdl b/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/state.0000072000.cdl similarity index 100% rename from utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/state.0000072000.cdl rename to utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/state.0000072000.cdl diff --git a/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/state.0000072000.md5 b/utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/state.0000072000.md5 similarity index 100% rename from utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/run/mnc_test_0001/state.0000072000.md5 rename to utils/python/MITgcmutils/tests/md5/global_ocean.cs32x15/state.0000072000.md5 diff --git a/utils/python/MITgcmutils/tests/run-scripts b/utils/python/MITgcmutils/tests/run-scripts index 008797bd8f..c822f35c8b 100755 --- a/utils/python/MITgcmutils/tests/run-scripts +++ b/utils/python/MITgcmutils/tests/run-scripts @@ -9,11 +9,11 @@ fi err=0 for f in \ - global_ocean.cs32x15/run/mnc_test_0001/grid \ - global_ocean.cs32x15/run/mnc_test_0001/state.0000072000 \ - global_ocean.cs32x15/run/mnc_test_0001/oceDiag.0000072000 \ - global_ocean.cs32x15/run/mnc_test_0001/phiHyd.0000072000 \ - global_ocean.cs32x15/run/mnc_test_0001/phiHydLow.0000072000 \ + global_ocean.cs32x15/grid \ + global_ocean.cs32x15/state.0000072000 \ + global_ocean.cs32x15/oceDiag.0000072000 \ + global_ocean.cs32x15/phiHyd.0000072000 \ + global_ocean.cs32x15/phiHydLow.0000072000 \ eccov3/dic_tave.0000025920 do echo "# $f" diff --git a/utils/python/MITgcmutils/tests/test_cs.py b/utils/python/MITgcmutils/tests/test_cs.py index 8bcb53f2dc..e6ee299188 100644 --- a/utils/python/MITgcmutils/tests/test_cs.py +++ b/utils/python/MITgcmutils/tests/test_cs.py @@ -35,7 +35,7 @@ def test_pcol(tmpdir): with tmpdir.as_cwd(): ds = mit.rdmnc(pjoin(TEST_DATA_PATH, - 'global_ocean.cs32x15/run/mnc_test_0001/state.0000072000.t*.nc'), + 'global_ocean.cs32x15/state.0000072000.t*.nc'), ['XG', 'YG', 'Eta']) x = ds['XG'] y = ds['YG'] @@ -55,8 +55,8 @@ def test_pcol(tmpdir): def test_pcol_sphere(tmpdir): with tmpdir.as_cwd(): - ds = mit.rdmnc(pjoin(TEST_DATA_PATH, 'global_ocean.cs32x15', 'run', - 'mnc_test_0001', 'state.0000072000.*.nc'), + ds = mit.rdmnc(pjoin(TEST_DATA_PATH, 'global_ocean.cs32x15', + 'state.0000072000.*.nc'), ['XG', 'YG', 'Eta']) x = ds['XG'] y = ds['YG'] @@ -78,8 +78,8 @@ def test_pcol_sphere(tmpdir): if havebasemap: def test_pcol_basemap(tmpdir): with tmpdir.as_cwd(): - ds = mit.rdmnc(pjoin(TEST_DATA_PATH, 'global_ocean.cs32x15', 'run', - 'mnc_test_0001', 'state.0000072000.*.nc'), + ds = mit.rdmnc(pjoin(TEST_DATA_PATH, 'global_ocean.cs32x15', + 'state.0000072000.*.nc'), ['XG', 'YG', 'Eta']) x = ds['XG'] y = ds['YG'] diff --git a/utils/python/MITgcmutils/tests/test_diagnostics.py b/utils/python/MITgcmutils/tests/test_diagnostics.py index c78cd5c5e9..cf8dd15ae8 100644 --- a/utils/python/MITgcmutils/tests/test_diagnostics.py +++ b/utils/python/MITgcmutils/tests/test_diagnostics.py @@ -3,7 +3,7 @@ import MITgcmutils as mit def test_readstats_dims(): - locals, totals, itrs = mit.readstats('tests/diagstats/hs94.cs-32x32x5/tr_run.impIGW/dynStDiag.0000025920.txt') + locals, totals, itrs = mit.readstats('tests/diagstats/hs94.cs-32x32x5.impIGW/dynStDiag.0000025920.txt') assert itrs['ETAN'] == [25920, 25923, 25926, 25929] assert itrs['UVEL'] == [25920, 25923, 25926, 25929] assert set(locals) == {'ETAN', 'UVEL', 'VVEL', 'WVEL', 'THETA', 'PHIHYD', 'DETADT2'} @@ -17,7 +17,7 @@ def test_readstats_dims(): def test_readstats_regions_dims(): statsPerLayer, statsVertInt, itrs = mit.readstats( - 'tests/diagstats/aim.5l_cs/tr_run.thSI/landStDiag.0000000000.txt') + 'tests/diagstats/aim.5l_cs.thSI/landStDiag.0000000000.txt') assert set(statsVertInt) == {'GrdTemp', 'GrdWater', 'LdSnowH', 'GrdSurfT'} assert list(itrs) == ['LdSnowH', 'GrdSurfT', 'GrdTemp', 'GrdWater'] assert itrs['LdSnowH'] == [0, 8] @@ -35,7 +35,7 @@ def test_readstats_regions_dims(): def test_readstats_fields_regions(): statsPerLayer, statsVertInt, itrs = mit.readstats( - 'tests/diagstats/global_ocean.cs32x15/tr_run.thsice/thSIceStDiag.0000036000.txt') + 'tests/diagstats/global_ocean.cs32x15.thsice/thSIceStDiag.0000036000.txt') assert statsVertInt.dtype.names == ('SI_Fract', 'SI_Thick', 'SI_SnowH', 'SI_Tsrf', 'SI_Tice1', 'SI_Tice2', 'SI_Qice1', 'SI_Qice2', 'SIsnwPrc', 'SIalbedo', 'SIsnwAge', 'SIflx2oc', 'SIfrw2oc', 'SIsaltFx', 'SIflxAtm', 'SIfrwAtm') assert list(itrs) == ['SI_Fract', 'SI_Thick', 'SI_SnowH', 'SI_Tsrf', 'SI_Tice1', 'SI_Tice2', 'SI_Qice1', 'SI_Qice2', 'SIsnwPrc', 'SIalbedo', 'SIsnwAge', 'SIflx2oc', 'SIfrw2oc', 'SIsaltFx', 'SIflxAtm', 'SIfrwAtm'] assert itrs['SI_Fract'] == [36010, 36020] diff --git a/utils/python/MITgcmutils/tests/test_mnc.py b/utils/python/MITgcmutils/tests/test_mnc.py index 0d3d312fa5..3d5d16df51 100644 --- a/utils/python/MITgcmutils/tests/test_mnc.py +++ b/utils/python/MITgcmutils/tests/test_mnc.py @@ -40,8 +40,8 @@ def test_rdmnc_eccov3(): def test_rdmnc_cs32(): - ds = mit.rdmnc(pjoin(TEST_DATA_PATH, 'global_ocean.cs32x15', 'run', - 'mnc_test_0001', 'oceDiag.*.nc')) + ds = mit.rdmnc(pjoin(TEST_DATA_PATH, 'global_ocean.cs32x15', + 'oceDiag.*.nc')) assert sorted(ds) == ''' CONVADJ DRHODR GM_Kwx GM_Kwy GM_Kwz GM_PsiX GM_PsiY RHOAnoma T X Xp1 Y Yp1 diag_levels iter '''.split()