Skip to content

Commit

Permalink
Merge pull request ESCOMP#2449 from mvertens/feature/add_dglc
Browse files Browse the repository at this point in the history
change needed for the addition of a dglc component in cdeps
  • Loading branch information
ekluzek authored Apr 4, 2024
2 parents e007f67 + 1d6cea3 commit d79c236
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ required = True
local_path = components/cism
protocol = git
repo_url = https://github.com/ESCOMP/CISM-wrapper
tag = cismwrap_2_1_97
tag = cismwrap_2_1_99
externals = Externals_CISM.cfg
required = True

Expand Down
13 changes: 7 additions & 6 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 @@ -59,7 +60,7 @@ def buildnml(case, caseroot, compname):
run_refdate = case.get_value("RUN_REFDATE")
run_reftod = case.get_value("RUN_REFTOD")
glc_nec = case.get_value("GLC_NEC")
cism_use_antarctica = case.get_value("CISM_USE_ANTARCTICA")
glc_use_antarctica = case.get_value("GLC_USE_ANTARCTICA")
mask = case.get_value("MASK_GRID")
driver = case.get_value("COMP_INTERFACE").lower()

Expand Down Expand Up @@ -153,19 +154,19 @@ def buildnml(case, caseroot, compname):
else:
nomeg = ""

if cism_use_antarctica is None:
# This is the case for compsets without CISM, where the CISM_USE_ANTARCTICA xml
if glc_use_antarctica is None:
# This is the case for compsets with SGLC where the GLC_USE_ANTARCTICA xml
# variable isn't 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),
"Unexpected value for GLC_USE_ANTARCTICA: {}".format(glc_use_antarctica),
)

if clm_nml_use_case != "UNSET":
Expand Down

0 comments on commit d79c236

Please sign in to comment.