Skip to content

Commit

Permalink
add samegrid_ocn_wav to buildnml and use in namelist generation
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Aug 12, 2024
1 parent 1fd6c7b commit 9c3751e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
atm_mesh = case.get_value("ATM_DOMAIN_MESH")
lnd_mesh = case.get_value("LND_DOMAIN_MESH")
rof_mesh = case.get_value("ROF_DOMAIN_MESH")
ocn_mesh = case.get_value("OCN_DOMAIN_MESH")
wav_mesh = case.get_value("WAV_DOMAIN_MESH")
config["samegrid_atm_lnd"] = (
"true" if atm_mesh == case.get_value("LND_DOMAIN_MESH") else "false"
)
Expand All @@ -85,6 +87,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
"true" if atm_mesh == case.get_value("WAV_DOMAIN_MESH") else "false"
)
config["samegrid_lnd_rof"] = "true" if lnd_mesh == rof_mesh else "false"
config["samegrid_wav_ocn"] = "true" if ocn_mesh == wav_mesh else "false"

# determine if need to set atm_domainfile
scol_lon = float(case.get_value("PTS_LON"))
Expand Down
4 changes: 3 additions & 1 deletion cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,9 @@

<entry id="WAV2OCN_SMAPNAME">
<type>char</type>
<default_value>idmap</default_value>
<values>
<value>unset</value>
</values>
<group>run_domain</group>
<file>env_run.xml</file>
<desc>wav2ocn state mapping file</desc>
Expand Down
2 changes: 2 additions & 0 deletions cime_config/namelist_definition_drv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2312,6 +2312,7 @@
ocn to wav state mapping file for states
</desc>
<values>
<value samegrid_ocn_wav="true">idmap</value>
<value>$OCN2WAV_SMAPNAME</value>
</values>
</entry>
Expand All @@ -2325,6 +2326,7 @@
wav to ocn state mapping file for states
</desc>
<values>
<value samegrid_ocn_wav="true">idmap</value>
<value>$WAV2OCN_SMAPNAME</value>
</values>
</entry>
Expand Down

0 comments on commit 9c3751e

Please sign in to comment.