diff --git a/cime_config/buildnml b/cime_config/buildnml
index 44116d98..0206ac7b 100755
--- a/cime_config/buildnml
+++ b/cime_config/buildnml
@@ -75,6 +75,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"
)
@@ -88,6 +90,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"))
diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml
index 63e1b09a..b4d690a4 100644
--- a/cime_config/config_component.xml
+++ b/cime_config/config_component.xml
@@ -1405,6 +1405,24 @@
rof2ocn runoff mapping file
+
+ char
+ idmap
+ run_domain
+ env_run.xml
+ ocn2wav state mapping file
+
+
+
+ char
+
+ unset
+
+ run_domain
+ env_run.xml
+ wav2ocn state mapping file
+
+
char
1.0e-02
diff --git a/cime_config/namelist_definition_drv.xml b/cime_config/namelist_definition_drv.xml
index 0d72779b..e52f6735 100644
--- a/cime_config/namelist_definition_drv.xml
+++ b/cime_config/namelist_definition_drv.xml
@@ -2299,6 +2299,34 @@
+
+ char
+ mapping
+ abs
+ MED_attributes
+
+ ocn to wav state mapping file for states
+
+
+ idmap
+ $OCN2WAV_SMAPNAME
+
+
+
+
+ char
+ mapping
+ abs
+ MED_attributes
+
+ wav to ocn state mapping file for states
+
+
+ idmap
+ $WAV2OCN_SMAPNAME
+
+
+
diff --git a/mediator/esmFldsExchange_cesm_mod.F90 b/mediator/esmFldsExchange_cesm_mod.F90
index 5160e32b..abc901ba 100644
--- a/mediator/esmFldsExchange_cesm_mod.F90
+++ b/mediator/esmFldsExchange_cesm_mod.F90
@@ -75,6 +75,10 @@ module esmFldsExchange_cesm_mod
character(len=CX) :: rof2lnd_map = 'unset'
character(len=CX) :: lnd2rof_map = 'unset'
+ ! optional mapping files
+ character(len=CX) :: wav2ocn_map ='unset'
+ character(len=CX) :: ocn2wav_map = 'unset'
+
! no mapping files (value is 'idmap' or 'unset')
character(len=CX) :: atm2ice_map = 'unset'
character(len=CX) :: atm2ocn_map = 'unset'
@@ -84,9 +88,7 @@ module esmFldsExchange_cesm_mod
character(len=CX) :: ice2wav_map = 'unset'
character(len=CX) :: lnd2atm_map = 'unset'
character(len=CX) :: ocn2atm_map = 'unset'
- character(len=CX) :: ocn2wav_map = 'unset'
character(len=CX) :: rof2ocn_map = 'unset'
- character(len=CX) :: wav2ocn_map = 'unset'
logical :: mapuv_with_cart3d ! Map U/V vector wind fields from ATM to OCN/ICE by rotating in Cartesian 3D space and then back
logical :: flds_i2o_per_cat ! Ice thickness category fields passed to OCN
@@ -203,6 +205,14 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
if (maintask) write(logunit, '(a)') trim(subname)//'rof2ocn_ice_rmapname = '// trim(rof2ocn_ice_rmap)
+ call NUOPC_CompAttributeGet(gcomp, name='wav2ocn_smapname', value=wav2ocn_map, rc=rc)
+ if (chkerr(rc,__LINE__,u_FILE_u)) return
+ if (maintask) write(logunit, '(a)') trim(subname)//'wav2ocn_smapname = '// trim(wav2ocn_map)
+ call NUOPC_CompAttributeGet(gcomp, name='ocn2wav_smapname', value=ocn2wav_map, rc=rc)
+ if (chkerr(rc,__LINE__,u_FILE_u)) return
+ if (maintask) write(logunit, '(a)') trim(subname)//'ocn2wav_smapname = '// trim(ocn2wav_map)
+
+
! uv cart3d mapping
call NUOPC_CompAttributeGet(gcomp, name='mapuv_with_cart3d', value=cvalue, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return