Skip to content

Commit 82d183f

Browse files
CI test for input_data_list (#196)
* introduce a CI test that checks whether any input files in MOM_input is missing in input_data_list * minor changes in check_input_data_list * fix param_templates paths * minor improvement in check_input_data_list filter function * more improvements in check_input_data_list filter function * major check_input_data_list.py refactor and introduction of check_input_data_repo.py * fix general-ci-tests.yaml * take 2: fix general-ci-tests.yaml * add all missing input_data_list entries
1 parent 112f5ca commit 82d183f

7 files changed

Lines changed: 321 additions & 56 deletions

File tree

.github/workflows/general-ci-tests.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,35 @@ jobs:
8989
# Run the test
9090
- name: Run the check_default_params script
9191
run: python tests/check_default_params.py
92-
92+
93+
# Job to run check_input_data_list script
94+
check_input_data_list:
95+
96+
runs-on: ubuntu-latest
97+
98+
steps:
99+
# Checkout the repo
100+
- uses: actions/checkout@v4
101+
102+
# Run the test
103+
- name: Run the check_input_data_list script
104+
run: python tests/check_input_data_list.py
105+
106+
# Job to run check_input_data_repo script
107+
check_input_data_repo:
108+
109+
runs-on: ubuntu-latest
110+
111+
steps:
112+
# Checkout the repo
113+
- uses: actions/checkout@v4
114+
115+
# Run the test
116+
- name: Run the check_input_data_repo script
117+
run: |
118+
pip install 'svn>=1,<1.1'
119+
python tests/check_input_data_repo.py
120+
93121
# Job to run the black formatter for cime_config, see black documentation for more info
94122
check_black_format_for_cime_config:
95123

param_templates/MOM_input.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,9 +2782,7 @@ Global:
27822782
"default = 'MOM_IC'
27832783
The file into which to write the initial conditions."
27842784
datatype: string
2785-
value:
2786-
$OCN_GRID == "MISOMIP": "MISOMIP_IC"
2787-
else: = "${CASE}.mom6.ic.${RUN_STARTDATE}.nc"
2785+
value: = "${CASE}.mom6.ic.${RUN_STARTDATE}.nc"
27882786
TRIMMING_USES_REMAPPING:
27892787
description: |
27902788
"[Boolean] default = False
Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,67 @@
11
# The list of input files to be checked out from inputdata
22
---
33
mom.input_data_list:
4-
ocean_hgrid:
4+
GRID_FILE:
55
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/ocean_hgrid_221123.nc"
66
$OCN_GRID == "tx0.25v1": "${INPUTDIR}/ocean_hgrid.nc"
7-
ocean_vgrid1:
8-
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/vgrid_65L_20200626.nc"
7+
ALE_COORDINATE_CONFIG:
8+
$MOM6_VERTICAL_GRID == "zstar_75L": "${INPUTDIR}/zstar_75layer_2.5m_248.4m-2024-03-29.nc"
9+
$MOM6_VERTICAL_GRID == "zstar_65L": "${INPUTDIR}/vgrid_65L_20200626.nc"
10+
$MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID != "tx0.25v1": "${INPUTDIR}/hybrid_75layer_zstar2.50m-2020-11-23.nc"
11+
$MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID == "tx0.25v1": "${INPUTDIR}/hycom1_75_800m.nc"
912
$OCN_GRID == "tx0.25v1": "${INPUTDIR}/hycom1_75_800m.nc"
10-
ocean_vgrid2:
13+
DIAG_COORD_DEF_Z:
1114
$OCN_GRID == "tx0.25v1": "${INPUTDIR}/interpolate_zgrid_40L.nc"
12-
ocean_vgrid3:
15+
COORD_FILE:
1316
$OCN_GRID == "tx0.25v1": "${INPUTDIR}/layer_coord.nc"
14-
ocean_topog:
15-
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/ocean_topog_230413.nc"
17+
TOPO_FILE:
18+
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/ocean_topo_tx2_3v2_240501.nc"
1619
$OCN_GRID == "tx0.25v1": "${INPUTDIR}/ocean_topog.nc"
17-
ocean_topo_edit:
20+
TOPO_EDITS_FILE:
1821
$OCN_GRID == "tx0.25v1": "${INPUTDIR}/All_edits.nc"
19-
tempsalt:
22+
TEMP_SALT_Z_INIT_FILE:
2023
$OCN_GRID in ["tx2_3v2", "tx0.25v1"]:
2124
$INIT_LAYERS_FROM_Z_FILE == "True":
2225
"${INPUTDIR}/${TEMP_SALT_Z_INIT_FILE}"
23-
saltrestore:
26+
MAX_LAYER_THICKNESS_CONFIG:
27+
$MOM6_VERTICAL_GRID == "hycom1" and $OCN_GRID in ["tx2_3v2"]:
28+
"${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max_90th_quantile.nc"
29+
SURFACE_PRESSURE_FILE:
30+
$OCN_GRID == "MISOMIP": "${INPUTDIR}/MISOMIP_181108.nc"
31+
SALT_RESTORE_FILE:
2432
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/state_restore_tx2_3_20230416.nc"
25-
tidal:
33+
TIDAL_ENERGY_FILE:
34+
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/energy_new_tx2_3_conserve_230415_cdf5.nc"
2635
$OCN_GRID == "tx0.25v1": "${INPUTDIR}/tidal_amplitude.v20140616.nc"
27-
ocean_channel:
36+
CHANNEL_LIST_FILE:
37+
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/MOM_channels_global_tx2_3v2_240501"
2838
$OCN_GRID == "tx0.25v1": "${INPUTDIR}/MOM_channels_global_025"
29-
ocean_geothermal:
39+
GEOTHERMAL_FILE:
40+
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/geothermal_davies2013_tx2_3_20240318_cdf5.nc"
3041
$OCN_GRID == "tx0.25v1": "${INPUTDIR}/geothermal_davies2013_v1.nc"
31-
ocean_seaw:
42+
CHL_FILE:
3243
$OCN_GRID == "tx0.25v1": "${INPUTDIR}/seawifs-clim-1997-2010.1440x1080.v20180328.nc"
3344
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/seawifs-clim-1997-2010-tx2_3v2.230416.nc"
34-
cfcs_forcing: "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/cfc_atm_20230310.nc"
35-
diag_coord_def_rho2:
45+
CFC_BC_FILE: "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/cfc_atm_20230310.nc"
46+
DIAG_COORD_DEF_RHO2:
3647
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/ocean_rho2_190917.nc"
37-
marbl_tracers_ic_file:
38-
$MARBL_CONFIG == "latest": "${INPUTDIR}/ecosys_jan_IC_omip_latlon_1x1_180W_c231221.nc"
48+
MARBL_TRACERS_IC_FILE:
49+
$MARBL_CONFIG == "latest": "${INPUTDIR}/ecosys_jan_IC_omip_latlon_1x1_180W_c230331.nc"
3950
$MARBL_CONFIG == "latest+4p2z": "${INPUTDIR}/ecosys_jan_IC_omip_latlon_1x1_180W_c231221.nc"
40-
marbl_fesedflux_file:
51+
MARBL_FESEDFLUX_FILE:
4152
'"BASE_BIO_ON=TRUE" in $MARBL_TRACER_OPTS':
4253
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/fesedflux_total_reduce_oxic_tx2_3v2.c231205.nc"
43-
marbl_feventflux_file:
54+
MARBL_FEVENTFLUX_FILE:
4455
'"BASE_BIO_ON=TRUE" in $MARBL_TRACER_OPTS':
4556
$OCN_GRID == "tx2_3v2": "${INPUTDIR}/feventflux_5gmol_tx2_3v2.c231205.nc"
46-
riv_flux_file:
57+
RIV_FLUX_FILE:
4758
'"BASE_BIO_ON=TRUE" in $MARBL_TRACER_OPTS':
4859
'$ROF_GRID == "JRA025" and $OCN_GRID == "tx2_3v2"': "${INPUTDIR}/riv_nut.gnews_gnm.rJRA025_to_tx2_3v2_nnsm_e333r100_230415.20240202.nc"
4960
'$ROF_GRID == "r05" and $OCN_GRID == "tx2_3v2"': "${INPUTDIR}/riv_nut.gnews_gnm.r05_to_tx2_3v2_nnsm_e250r250_230914.20240202.nc"
50-
d14c_file_1:
61+
MARBL_D14C_FILE_1:
5162
'"ABIO_DIC_ON=TRUE" in $MARBL_TRACER_OPTS': "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/atm_delta_C14_CMIP6_sector1_global_1850-2015_yearly_v2.0_c240202.nc"
52-
d14c_file_2:
63+
MARBL_D14C_FILE_2:
5364
'"ABIO_DIC_ON=TRUE" in $MARBL_TRACER_OPTS': "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/atm_delta_C14_CMIP6_sector2_global_1850-2015_yearly_v2.0_c240202.nc"
54-
d14c_file_3:
65+
MARBL_D14C_FILE_3:
5566
'"ABIO_DIC_ON=TRUE" in $MARBL_TRACER_OPTS': "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/atm_delta_C14_CMIP6_sector3_global_1850-2015_yearly_v2.0_c240202.nc"
5667
...

param_templates/json/MOM_input.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,10 +2211,7 @@
22112211
"IC_OUTPUT_FILE": {
22122212
"description": "\"default = 'MOM_IC'\nThe file into which to write the initial conditions.\"\n",
22132213
"datatype": "string",
2214-
"value": {
2215-
"$OCN_GRID == \"MISOMIP\"": "MISOMIP_IC",
2216-
"else": "= \"${CASE}.mom6.ic.${RUN_STARTDATE}.nc\""
2217-
}
2214+
"value": "= \"${CASE}.mom6.ic.${RUN_STARTDATE}.nc\""
22182215
},
22192216
"TRIMMING_USES_REMAPPING": {
22202217
"description": "\"[Boolean] default = False\nWhen trimming the column, also remap T and S.\"\n",

param_templates/json/input_data_list.json

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,90 @@
11
{
22
"mom.input_data_list": {
3-
"ocean_hgrid": {
3+
"GRID_FILE": {
44
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/ocean_hgrid_221123.nc",
55
"$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/ocean_hgrid.nc"
66
},
7-
"ocean_vgrid1": {
8-
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/vgrid_65L_20200626.nc",
7+
"ALE_COORDINATE_CONFIG": {
8+
"$MOM6_VERTICAL_GRID == \"zstar_75L\"": "${INPUTDIR}/zstar_75layer_2.5m_248.4m-2024-03-29.nc",
9+
"$MOM6_VERTICAL_GRID == \"zstar_65L\"": "${INPUTDIR}/vgrid_65L_20200626.nc",
10+
"$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID != \"tx0.25v1\"": "${INPUTDIR}/hybrid_75layer_zstar2.50m-2020-11-23.nc",
11+
"$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/hycom1_75_800m.nc",
912
"$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/hycom1_75_800m.nc"
1013
},
11-
"ocean_vgrid2": {
14+
"DIAG_COORD_DEF_Z": {
1215
"$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/interpolate_zgrid_40L.nc"
1316
},
14-
"ocean_vgrid3": {
17+
"COORD_FILE": {
1518
"$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/layer_coord.nc"
1619
},
17-
"ocean_topog": {
18-
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/ocean_topog_230413.nc",
20+
"TOPO_FILE": {
21+
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/ocean_topo_tx2_3v2_240501.nc",
1922
"$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/ocean_topog.nc"
2023
},
21-
"ocean_topo_edit": {
24+
"TOPO_EDITS_FILE": {
2225
"$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/All_edits.nc"
2326
},
24-
"tempsalt": {
27+
"TEMP_SALT_Z_INIT_FILE": {
2528
"$OCN_GRID in [\"tx2_3v2\", \"tx0.25v1\"]": {
2629
"$INIT_LAYERS_FROM_Z_FILE == \"True\"": "${INPUTDIR}/${TEMP_SALT_Z_INIT_FILE}"
2730
}
2831
},
29-
"saltrestore": {
32+
"MAX_LAYER_THICKNESS_CONFIG": {
33+
"$MOM6_VERTICAL_GRID == \"hycom1\" and $OCN_GRID in [\"tx2_3v2\"]": "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/dz_max_90th_quantile.nc"
34+
},
35+
"SURFACE_PRESSURE_FILE": {
36+
"$OCN_GRID == \"MISOMIP\"": "${INPUTDIR}/MISOMIP_181108.nc"
37+
},
38+
"SALT_RESTORE_FILE": {
3039
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/state_restore_tx2_3_20230416.nc"
3140
},
32-
"tidal": {
41+
"TIDAL_ENERGY_FILE": {
42+
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/energy_new_tx2_3_conserve_230415_cdf5.nc",
3343
"$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/tidal_amplitude.v20140616.nc"
3444
},
35-
"ocean_channel": {
45+
"CHANNEL_LIST_FILE": {
46+
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/MOM_channels_global_tx2_3v2_240501",
3647
"$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/MOM_channels_global_025"
3748
},
38-
"ocean_geothermal": {
49+
"GEOTHERMAL_FILE": {
50+
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/geothermal_davies2013_tx2_3_20240318_cdf5.nc",
3951
"$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/geothermal_davies2013_v1.nc"
4052
},
41-
"ocean_seaw": {
53+
"CHL_FILE": {
4254
"$OCN_GRID == \"tx0.25v1\"": "${INPUTDIR}/seawifs-clim-1997-2010.1440x1080.v20180328.nc",
4355
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/seawifs-clim-1997-2010-tx2_3v2.230416.nc"
4456
},
45-
"cfcs_forcing": "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/cfc_atm_20230310.nc",
46-
"diag_coord_def_rho2": {
57+
"CFC_BC_FILE": "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/cfc_atm_20230310.nc",
58+
"DIAG_COORD_DEF_RHO2": {
4759
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/ocean_rho2_190917.nc"
4860
},
49-
"marbl_tracers_ic_file": {
50-
"$MARBL_CONFIG == \"latest\"": "${INPUTDIR}/ecosys_jan_IC_omip_latlon_1x1_180W_c231221.nc",
61+
"MARBL_TRACERS_IC_FILE": {
62+
"$MARBL_CONFIG == \"latest\"": "${INPUTDIR}/ecosys_jan_IC_omip_latlon_1x1_180W_c230331.nc",
5163
"$MARBL_CONFIG == \"latest+4p2z\"": "${INPUTDIR}/ecosys_jan_IC_omip_latlon_1x1_180W_c231221.nc"
5264
},
53-
"marbl_fesedflux_file": {
65+
"MARBL_FESEDFLUX_FILE": {
5466
"\"BASE_BIO_ON=TRUE\" in $MARBL_TRACER_OPTS": {
5567
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/fesedflux_total_reduce_oxic_tx2_3v2.c231205.nc"
5668
}
5769
},
58-
"marbl_feventflux_file": {
70+
"MARBL_FEVENTFLUX_FILE": {
5971
"\"BASE_BIO_ON=TRUE\" in $MARBL_TRACER_OPTS": {
6072
"$OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/feventflux_5gmol_tx2_3v2.c231205.nc"
6173
}
6274
},
63-
"riv_flux_file": {
75+
"RIV_FLUX_FILE": {
6476
"\"BASE_BIO_ON=TRUE\" in $MARBL_TRACER_OPTS": {
6577
"$ROF_GRID == \"JRA025\" and $OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/riv_nut.gnews_gnm.rJRA025_to_tx2_3v2_nnsm_e333r100_230415.20240202.nc",
6678
"$ROF_GRID == \"r05\" and $OCN_GRID == \"tx2_3v2\"": "${INPUTDIR}/riv_nut.gnews_gnm.r05_to_tx2_3v2_nnsm_e250r250_230914.20240202.nc"
6779
}
6880
},
69-
"d14c_file_1": {
81+
"MARBL_D14C_FILE_1": {
7082
"\"ABIO_DIC_ON=TRUE\" in $MARBL_TRACER_OPTS": "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/atm_delta_C14_CMIP6_sector1_global_1850-2015_yearly_v2.0_c240202.nc"
7183
},
72-
"d14c_file_2": {
84+
"MARBL_D14C_FILE_2": {
7385
"\"ABIO_DIC_ON=TRUE\" in $MARBL_TRACER_OPTS": "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/atm_delta_C14_CMIP6_sector2_global_1850-2015_yearly_v2.0_c240202.nc"
7486
},
75-
"d14c_file_3": {
87+
"MARBL_D14C_FILE_3": {
7688
"\"ABIO_DIC_ON=TRUE\" in $MARBL_TRACER_OPTS": "${DIN_LOC_ROOT}/ocn/mom/grid_indpt/atm_delta_C14_CMIP6_sector3_global_1850-2015_yearly_v2.0_c240202.nc"
7789
}
7890
}

0 commit comments

Comments
 (0)