Skip to content

Commit f4f64c3

Browse files
authored
Merge pull request #504 from mvertens/feature/update_dms_exchange
update dms exchange
2 parents a664d62 + 7c75a56 commit f4f64c3

File tree

4 files changed

+23
-15
lines changed

4 files changed

+23
-15
lines changed

.github/workflows/srt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
python-version: [ 3.10.9 ]
21+
python-version: [ 3.x ]
2222
env:
2323
CC: mpicc
2424
FC: mpifort

cime_config/buildnml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
5252
config["mask_grid"] = case.get_value("MASK_GRID")
5353
for val in ("HIST", "REST", "STOP"):
5454
config[val.lower()+"_option"] = case.get_value(val+"_OPTION")
55-
55+
5656

5757
config["comp_ocn"] = case.get_value("COMP_OCN")
5858

59+
5960
atm_grid = case.get_value("ATM_GRID")
6061
lnd_grid = case.get_value("LND_GRID")
6162
ice_grid = case.get_value("ICE_GRID")
@@ -113,7 +114,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
113114
config["COMP_ROF"] = case.get_value("COMP_ROF")
114115
config["COMP_WAV"] = case.get_value("COMP_WAV")
115116
config["CAMDEV"] = "True" if "CAM70" in case.get_value("COMPSET") else "False"
116-
117+
117118
if (
118119
(
119120
case.get_value("COMP_ROF") == "mosart"
@@ -135,6 +136,12 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
135136

136137
config['wav_ice_coupling'] = 'ww3' in config['COMP_WAV'] and config['COMP_ICE'] == 'cice'
137138

139+
if config["COMP_OCN"] == "blom":
140+
if "ecosys" in case.get_value("BLOM_TRACER_MODULES"):
141+
config["dms_from_ocn"] = "on"
142+
else:
143+
config["dms_from_ocn"] = "off"
144+
138145
# ----------------------------------------------------
139146
# Initialize namelist defaults
140147
# ----------------------------------------------------
@@ -156,7 +163,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
156163
add_gusts = literal_to_python_value(nmlgen.get_value("add_gusts"), type_="logical")
157164
if add_gusts:
158165
expect("CAM70" in case.get_value("COMPSET"),"ERROR: add_gusts can only be set if CAM70 in compset {}".format(case.get_value("COMPSET")))
159-
166+
160167
# --------------------------------
161168
# Overwrite: set component coupling frequencies
162169
# --------------------------------
@@ -206,7 +213,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
206213
mindt = min(mindt, cpl_dt)
207214

208215
# Here we convert "nsteps" to "nseconds", this simplifies the fortran
209-
216+
210217
for val in ("REST", "HIST", "STOP"):
211218
if case.get_value(val+"_OPTION") == "nsteps":
212219
nsteps = case.get_value(val+"_N")
@@ -217,7 +224,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
217224
else:
218225
nmlgen.set_value("stop_n", value=mindt*nsteps)
219226

220-
227+
221228
# sanity check
222229
comp_atm = case.get_value("COMP_ATM")
223230
if comp_atm is not None and comp_atm not in ("datm", "xatm", "satm"):
@@ -640,7 +647,7 @@ def buildnml(case, caseroot, component):
640647
major = line[-2] if "MAJOR" in line else major
641648
minor = line[-2] if "MINOR" in line else minor
642649
logger.debug("ESMF version major {} minor {}".format(major, minor))
643-
expect(int(major) >= 8 and int(minor) >=6, "ESMF version should be 8.6.1 or newer")
650+
expect(int(major) >= 8 and int(minor) >=4, "ESMF version should be 8.4.1 or newer")
644651

645652
confdir = os.path.join(case.get_value("CASEBUILD"), "cplconf")
646653
if not os.path.isdir(confdir):
@@ -682,7 +689,7 @@ def buildnml(case, caseroot, component):
682689
create_namelist_infile(case, user_nl_file, namelist_infile, infile_text)
683690
infile = [namelist_infile]
684691

685-
692+
686693
# create the files nuopc.runconfig, nuopc.runseq, drv_in and drv_flds_in
687694
_create_drv_namelists(case, infile, confdir, nmlgen, files)
688695

cime_config/namelist_definition_drv.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@
889889
<values>
890890
<value>.false.</value>
891891
</values>
892-
</entry>
892+
</entry>
893893

894894
<entry id="info_debug" modify_via_xml="INFO_DBUG">
895895
<type>integer</type>
@@ -2450,7 +2450,7 @@
24502450
</values>
24512451
</entry>
24522452

2453-
<entry id="flds_dms" modify_via_xml="DMS_EMIS_OCN">
2453+
<entry id="flds_dms">
24542454
<type>logical</type>
24552455
<category>flds</category>
24562456
<group>ALLCOMP_attributes</group>
@@ -2459,10 +2459,11 @@
24592459
</desc>
24602460
<values>
24612461
<value>.false.</value>
2462+
<value dms_from_ocn="on">.true.</value>
24622463
</values>
24632464
</entry>
24642465

2465-
<entry id="flds_brf" modify_via_xml="BRF_EMIS_OCN">
2466+
<entry id="flds_brf">
24662467
<type>logical</type>
24672468
<category>flds</category>
24682469
<group>ALLCOMP_attributes</group>

mediator/esmFldsExchange_cesm_mod.F90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,7 +1721,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
17211721
else
17221722
if ( fldchk(is_local%wrap%FBImp(compocn,compocn), 'Faoo_fdms_ocn', rc=rc) .and. &
17231723
fldchk(is_local%wrap%FBexp(compatm) , 'Faoo_fdms_ocn', rc=rc)) then
1724-
call addmap_from(compocn, 'Faoo_fdms_ocn', compocn, mapconsd, 'one', ocn2atm_map)
1724+
call addmap_from(compocn, 'Faoo_fdms_ocn', compatm, mapconsd, 'one', ocn2atm_map)
17251725
! custom merge in med_phases_prep_atm
17261726
end if
17271727
end if
@@ -1735,7 +1735,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
17351735
else
17361736
if ( fldchk(is_local%wrap%FBImp(compocn,compocn), 'Faoo_fbrf_ocn', rc=rc) .and. &
17371737
fldchk(is_local%wrap%FBexp(compatm) , 'Faoo_fbrf_ocn', rc=rc)) then
1738-
call addmap_from(compocn, 'Faoo_fbrf_ocn', compocn, mapconsd, 'one', ocn2atm_map)
1738+
call addmap_from(compocn, 'Faoo_fbrf_ocn', compatm, mapconsd, 'one', ocn2atm_map)
17391739
! custom merge in med_phases_prep_atm
17401740
end if
17411741
end if
@@ -1749,7 +1749,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
17491749
else
17501750
if ( fldchk(is_local%wrap%FBImp(compocn,compocn), 'Faoo_fn2o_ocn', rc=rc) .and. &
17511751
fldchk(is_local%wrap%FBexp(compatm) , 'Faoo_fn2o_ocn', rc=rc)) then
1752-
call addmap_from(compocn, 'Faoo_fn2o_ocn', compocn, mapconsd, 'one', ocn2atm_map)
1752+
call addmap_from(compocn, 'Faoo_fn2o_ocn', compatm, mapconsd, 'one', ocn2atm_map)
17531753
! custom merge in med_phases_prep_atm
17541754
end if
17551755
end if
@@ -1763,7 +1763,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
17631763
else
17641764
if ( fldchk(is_local%wrap%FBImp(compocn,compocn), 'Faoo_fnh3_ocn', rc=rc) .and. &
17651765
fldchk(is_local%wrap%FBexp(compatm) , 'Faoo_fnh3_ocn', rc=rc)) then
1766-
call addmap_from(compocn, 'Faoo_fnh3_ocn', compocn, mapconsd, 'one', ocn2atm_map)
1766+
call addmap_from(compocn, 'Faoo_fnh3_ocn', compatm, mapconsd, 'one', ocn2atm_map)
17671767
! custom merge in med_phases_prep_atm
17681768
end if
17691769
end if

0 commit comments

Comments
 (0)