Skip to content
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
14 changes: 11 additions & 3 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import logging
CIMEROOT = os.environ.get("CIMEROOT")
if CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")
sys.path.append(os.path.join(CIMEROOT, "scripts", "Tools"))
sys.path.append(os.path.join(CIMEROOT, "CIME", "Tools"))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates path to cime/CIME/Tools, not related to the issue of the PR.


# The scope of the following path expansion is limited to this script only,
# and is needed to import MOM6 input file classes:
Expand Down Expand Up @@ -433,7 +433,15 @@ def buildnml(case, caseroot, compname):
# Build the component namelist
if compname != "mom":
raise AttributeError

# add the FMS library to the list of cesm support libraries for the case
# designed to be backward compatible in case cmeps does not define CASE_SUPPORT_LIBRARIES
try:
libs = case.get_values("CASE_SUPPORT_LIBRARIES")
if libs is not None and "FMS" not in libs:
libs.extend(["gptl","pio","csm_share","FMS"])
case.set_value("CASE_SUPPORT_LIBRARIES", ",".join(libs))
except:
pass
ninst = case.get_value("NINST_OCN")
inst_suffixes = (
["_{:04d}".format(i + 1) for i in range(ninst)] if ninst > 1 else [""]
Expand All @@ -460,7 +468,7 @@ def buildnml(case, caseroot, compname):
def _main_func():

caseroot = parse_input(sys.argv)
with Case(caseroot) as case:
with Case(caseroot, read_only=False) as case:
buildnml(case, caseroot, "mom")


Expand Down