Skip to content

Commit

Permalink
ACCESS-ESM1.5 QA test: Add check for no repreated fields between CICE…
Browse files Browse the repository at this point in the history
… namelists
  • Loading branch information
jo-basevi committed Aug 28, 2024
1 parent ad524eb commit e92cad4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/model_config_tests/qa/test_access_esm1p5_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,13 @@ def test_cice_configuration_icefields_nml_in_ice_history_nml(
assert cice_in_path.is_file()
cice_in = f90nml.read(cice_in_path)
assert ICEFIELDS_NML_NAME not in cice_in, icefields_nml_error_msg

# Check no repeated fields between the two namelist files
common_nmls = set(cice_in) & set(ice_history_nml)
for nml in common_nmls:
repeated_fields = set(cice_in[nml]) & set(ice_history_nml[nml])
assert repeated_fields == set(), (
f"Found repeated fields for '{nml}' namelist"
f" in {CICE_IN_NML_FNAME} and {ICE_HISTORY_NML_FNAME}"
f": {repeated_fields}"
)
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
&setup_nml
mock_field = 365
days_per_year = 365
, year_init = 0001
, istep0 = 0
/
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
&setup_nml
, histfreq = 'd','m','x','x','x'
, histfreq_n = 1, 1, 1, 1, 1
, hist_avg = .true.
/

&icefields_nml
mock_field = .true.
/

0 comments on commit e92cad4

Please sign in to comment.