Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

put in changes needed for addition of new dglc component #72

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ _config_cache_template = """
</config_definition>
"""


###############################################################################
def buildnml(case, caseroot, compname):
###############################################################################
Expand Down Expand Up @@ -60,6 +61,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 +146,38 @@ 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?"
mvdebolskiy marked this conversation as resolved.
Show resolved Hide resolved
+ " 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
Loading