Skip to content

Commit

Permalink
put in changes needed for addition of new dglc component
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariana Vertenstein committed Apr 1, 2024
1 parent c02972b commit 29bb217
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def buildnml(case, caseroot, compname):
run_reftod = case.get_value("RUN_REFTOD")
glc_nec = case.get_value("GLC_NEC")
cism_use_antarctica = case.get_value("CISM_USE_ANTARCTICA")
dglc_use_antarctica = case.get_value("DGLC_USE_ANTARCTICA")
mask = case.get_value("MASK_GRID")
driver = case.get_value("COMP_INTERFACE").lower()

Expand Down Expand Up @@ -144,29 +145,39 @@ def buildnml(case, caseroot, compname):
or clm_usrdat_name is "NEON.PRISM"
):
logger.warning(
"WARNING: Do you have approriprate initial conditions for this simulation?"
+ " Check that the finidat file used in the lnd_in namelist is apprporiately spunup for your case"
"WARNING: Do you have appropriate initial conditions for this simulation?"
+ " Check that the finidat file used in the lnd_in namelist is appropriately spunup for your case"
)

if comp_atm != "datm":
nomeg = "-no-megan"
else:
nomeg = ""

if cism_use_antarctica is None:
# This is the case for compsets without CISM, where the CISM_USE_ANTARCTICA xml
# variable isn't defined

glc_use_antarctica = cism_use_antarctica
if glc_use_antarctica is None:
glc_use_antarctica = dglc_use_antarctica
if glc_use_antarctica is None:
# This is the case for compsets without CISM or DGLC, where the
# CISM_USE_ANTARCTICA and DGLC_USE_ANTARCTICA xml variables are not defined
glc_use_antarctica_flag = ""
elif isinstance(cism_use_antarctica, bool):
if cism_use_antarctica:
elif isinstance(glc_use_antarctica, bool):
if glc_use_antarctica:
glc_use_antarctica_flag = "-glc_use_antarctica"
else:
glc_use_antarctica_flag = ""
else:
expect(
False,
"Unexpected value for CISM_USE_ANTARCTICA: {}".format(cism_use_antarctica),
)
if cism_use_antarctia:
expect(
False,
"Unexpected value for CISM_USE_ANTARCTICA: {}".format(cism_use_antarctica),
)
else:
expect(
False,
"Unexpected value for DGLC_USE_ANTARCTICA: {}".format(dglc_use_antarctica),
)

if clm_nml_use_case != "UNSET":
usecase = "-use_case %s" % clm_nml_use_case
Expand Down

0 comments on commit 29bb217

Please sign in to comment.