-
Notifications
You must be signed in to change notification settings - Fork 97
moves liblist to driver buildnml making cime more generic #584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
22f1dce
e4030eb
32d3d9d
5536f78
dbf5588
4161f31
60a8e23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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,13 +628,36 @@ 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): | ||
| ############################################################################### | ||
| 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") | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updates to latest PIO, not related to issue of the PR.