@@ -15,7 +15,7 @@ import logging
15
15
CIMEROOT = os .environ .get ("CIMEROOT" )
16
16
if CIMEROOT is None :
17
17
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" ))
19
19
20
20
# The scope of the following path expansion is limited to this script only,
21
21
# and is needed to import MOM6 input file classes:
@@ -433,7 +433,15 @@ def buildnml(case, caseroot, compname):
433
433
# Build the component namelist
434
434
if compname != "mom" :
435
435
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
437
445
ninst = case .get_value ("NINST_OCN" )
438
446
inst_suffixes = (
439
447
["_{:04d}" .format (i + 1 ) for i in range (ninst )] if ninst > 1 else ["" ]
@@ -460,7 +468,7 @@ def buildnml(case, caseroot, compname):
460
468
def _main_func ():
461
469
462
470
caseroot = parse_input (sys .argv )
463
- with Case (caseroot ) as case :
471
+ with Case (caseroot , read_only = False ) as case :
464
472
buildnml (case , caseroot , "mom" )
465
473
466
474
0 commit comments