@@ -15,7 +15,7 @@ import logging
1515CIMEROOT = os .environ .get ("CIMEROOT" )
1616if CIMEROOT is None :
1717 raise SystemExit ("ERROR: must set CIMEROOT environment variable" )
18- sys .path .append (os .path .join (CIMEROOT , "scripts " , "Tools" ))
18+ sys .path .append (os .path .join (CIMEROOT , "CIME " , "Tools" ))
1919
2020# The scope of the following path expansion is limited to this script only,
2121# and is needed to import MOM6 input file classes:
@@ -433,7 +433,15 @@ def buildnml(case, caseroot, compname):
433433 # Build the component namelist
434434 if compname != "mom" :
435435 raise AttributeError
436-
436+ # add the FMS library to the list of cesm support libraries for the case
437+ # designed to be backward compatible in case cmeps does not define CASE_SUPPORT_LIBRARIES
438+ try :
439+ libs = case .get_values ("CASE_SUPPORT_LIBRARIES" )
440+ if libs is not None and "FMS" not in libs :
441+ libs .extend (["gptl" ,"pio" ,"csm_share" ,"FMS" ])
442+ case .set_value ("CASE_SUPPORT_LIBRARIES" , "," .join (libs ))
443+ except :
444+ pass
437445 ninst = case .get_value ("NINST_OCN" )
438446 inst_suffixes = (
439447 ["_{:04d}" .format (i + 1 ) for i in range (ninst )] if ninst > 1 else ["" ]
@@ -460,7 +468,7 @@ def buildnml(case, caseroot, compname):
460468def _main_func ():
461469
462470 caseroot = parse_input (sys .argv )
463- with Case (caseroot ) as case :
471+ with Case (caseroot , read_only = False ) as case :
464472 buildnml (case , caseroot , "mom" )
465473
466474
0 commit comments