diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index 31ee1d131..98e97978e 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -28,7 +28,7 @@ jobs: LDFLAGS: "-L/usr/lib/x86_64-linux-gnu -lnetcdf -lnetcdff -lpnetcdf" # Versions of all dependencies can be updated here ESMF_VERSION: v8.8.0 - PARALLELIO_VERSION: pio2_6_5 + PARALLELIO_VERSION: pio2_6_6 CIME_MODEL: cesm CIME_DRIVER: nuopc GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/cime_config/buildnml b/cime_config/buildnml index 7ffc28f82..692e30e54 100755 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -7,7 +7,7 @@ _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")) import shutil, glob, itertools from standard_script_setup import * @@ -628,6 +628,26 @@ def compare_drv_flds_in(first, second, infile1, infile2): % (infile1, infile2), ) +def cmeps_lib_list(case): + # provide a list of support libs that must be built for this case + # should be ordered with dependent libraries listed after those depended on + # the library names should match the keys in variable BUILD_LIB_FILE from config_files.xml + ufs_driver = os.environ.get("UFS_DRIVER") + if ufs_driver: + logger.info("UFS_DRIVER is set to {}".format(ufs_driver)) + + libs = case.get_values("CASE_SUPPORT_LIBRARIES") + + mpilib = case.get_value("MPILIB") + if mpilib == "mpi-serial": + libs.insert(0, mpilib) + + ocn_model = case.get_value("COMP_OCN") + # These will be handled by MOM and CAM, included here for backward compatibility. + atm_dycore = case.get_value("CAM_DYCORE") + if (ocn_model == "mom" or (atm_dycore and atm_dycore == "fv3")) and "FMS" not in libs: + libs.append("FMS") + return libs ############################################################################### def buildnml(case, caseroot, component): @@ -635,6 +655,9 @@ def buildnml(case, caseroot, component): if component != "drv": raise AttributeError + libs = cmeps_lib_list(case) + case.set_value("CASE_SUPPORT_LIBRARIES", ",".join(libs)) + esmfmkfile = os.getenv("ESMFMKFILE") expect( esmfmkfile and os.path.isfile(esmfmkfile), @@ -725,7 +748,7 @@ def buildnml(case, caseroot, component): def _main_func(): caseroot = parse_input(sys.argv) - with Case(caseroot) as case: + with Case(caseroot, read_only=False) as case: buildnml(case, caseroot, "drv") diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 5323b5df2..e2023a1a8 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -2522,10 +2522,22 @@ Remote git repository used for this case - - - + + char + + + gptl,pio,csm_share,FTorch,CDEPS + + build_def + env_build.xml + Support libraries required + + + + + + logical TRUE,FALSE