diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 32e53646d7..c02e20b678 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -53,3 +53,4 @@ aa04d1f7d86cc2503b98b7e2b2d84dbfff6c316b 045d90f1d80f713eb3ae0ac58f6c2352937f1eb0 753fda3ff0147837231a73c9c728dd9ce47b5997 f112ba0bbf96a61d5a4d354dc0dcbd8b0c68145c +bd535c710db78420b8e8b9d71d88d8339e899c59 diff --git a/.gitmodules b/.gitmodules index 36eea24b0f..a7322bb0e4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,7 +28,7 @@ [submodule "fates"] path = src/fates url = https://github.com/NGEET/fates -fxtag = sci.1.79.3_api.37.0.0 +fxtag = sci.1.80.4_api.37.0.0 fxrequired = AlwaysRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/fates-release @@ -60,7 +60,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/MOSART [submodule "mizuRoute"] path = components/mizuRoute url = https://github.com/ESCOMP/mizuRoute -fxtag = cesm-coupling.n02_v2.1.2 +fxtag = cesm-coupling.n02_v2.1.3 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute @@ -68,7 +68,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute [submodule "ccs_config"] path = ccs_config url = https://github.com/ESMCI/ccs_config_cesm.git -fxtag = ccs_config_cesm1.0.0 +fxtag = ccs_config_cesm1.0.10 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git @@ -76,7 +76,7 @@ fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git [submodule "cime"] path = cime url = https://github.com/ESMCI/cime -fxtag = cime6.0.246 +fxtag = cime6.1.49 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESMCI/cime @@ -84,7 +84,7 @@ fxDONOTUSEurl = https://github.com/ESMCI/cime [submodule "cmeps"] path = components/cmeps url = https://github.com/ESCOMP/CMEPS.git -fxtag = cmeps0.14.77 +fxtag = cmeps1.0.32 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git @@ -92,7 +92,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git [submodule "cdeps"] path = components/cdeps url = https://github.com/ESCOMP/CDEPS.git -fxtag = cdeps1.0.48 +fxtag = cdeps1.0.61 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git @@ -100,27 +100,27 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git [submodule "share"] path = share url = https://github.com/ESCOMP/CESM_share -fxtag = share1.0.19 +fxtag = share1.1.6 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share -[submodule "mct"] -path = libraries/mct -url = https://github.com/MCSclimate/MCT -fxtag = MCT_2.11.0 -fxrequired = ToplevelRequired -# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed -fxDONOTUSEurl = https://github.com/MCSclimate/MCT - [submodule "parallelio"] path = libraries/parallelio url = https://github.com/NCAR/ParallelIO -fxtag = pio2_6_2 +fxtag = pio2_6_3 fxrequired = ToplevelRequired # Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed fxDONOTUSEurl = https://github.com/NCAR/ParallelIO +[submodule "mpi-serial"] +path = libraries/mpi-serial +url = https://github.com/ESMCI/mpi-serial +fxtag = MPIserial_2.5.1 +fxrequired = ToplevelRequired +# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed +fxDONOTUSEurl = https://github.com/ESMCI/mpi-serial + [submodule "doc-builder"] path = doc/doc-builder url = https://github.com/ESMCI/doc-builder diff --git a/.lib/git-fleximod/.github/workflows/pytest.yaml b/.lib/git-fleximod/.github/workflows/pytest.yaml index 0868dd9a33..6cb8102b94 100644 --- a/.lib/git-fleximod/.github/workflows/pytest.yaml +++ b/.lib/git-fleximod/.github/workflows/pytest.yaml @@ -18,7 +18,7 @@ jobs: # reference the matrixe python version here. - uses: actions/setup-python@v5 with: - python-version: '3.9' + python-version: '3.12' # Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow # from installing Poetry every time, which can be slow. Note the use of the Poetry version @@ -29,7 +29,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.local - key: poetry-1.7.1 + key: poetry-1.8.2 # Install Poetry. You could do this manually, or there are several actions that do this. # `snok/install-poetry` seems to be minimal yet complete, and really just calls out to @@ -42,7 +42,7 @@ jobs: # cache it. - uses: snok/install-poetry@v1 with: - version: 1.7.1 + version: 1.8.2 virtualenvs-create: true virtualenvs-in-project: true @@ -74,4 +74,7 @@ jobs: git config --global user.name "${GITHUB_ACTOR}" git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" poetry run pytest + - name: Setup tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 diff --git a/.lib/git-fleximod/CODE_OF_CONDUCT.md b/.lib/git-fleximod/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..84f2925bba --- /dev/null +++ b/.lib/git-fleximod/CODE_OF_CONDUCT.md @@ -0,0 +1,107 @@ +# Contributor Code of Conduct +_The Contributor Code of Conduct is for participants in our software projects and community._ + +## Our Pledge +We, as contributors, creators, stewards, and maintainers (participants), of **git-fleximod** pledge to make participation in +our software, system or hardware project and community a safe, productive, welcoming and inclusive experience for everyone. +All participants are required to abide by this Code of Conduct. +This includes respectful treatment of everyone regardless of age, body size, disability, ethnicity, gender identity or expression, +level of experience, nationality, political affiliation, veteran status, pregnancy, genetic information, physical appearance, race, +religion, or sexual orientation, as well as any other characteristic protected under applicable US federal or state law. + +## Our Standards +Examples of behaviors that contribute to a positive environment include: + +* All participants are treated with respect and consideration, valuing a diversity of views and opinions +* Be considerate, respectful, and collaborative +* Communicate openly with respect for others, critiquing ideas rather than individuals and gracefully accepting criticism +* Acknowledging the contributions of others +* Avoid personal attacks directed toward other participants +* Be mindful of your surroundings and of your fellow participants +* Alert UCAR staff and suppliers/vendors if you notice a dangerous situation or someone in distress +* Respect the rules and policies of the project and venue + +Examples of unacceptable behavior include, but are not limited to: + +* Harassment, intimidation, or discrimination in any form +* Physical, verbal, or written abuse by anyone to anyone, including repeated use of pronouns other than those requested +* Unwelcome sexual attention or advances +* Personal attacks directed at other guests, members, participants, etc. +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Alarming, intimidating, threatening, or hostile comments or conduct +* Inappropriate use of nudity and/or sexual images +* Threatening or stalking anyone, including a participant +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Scope +This Code of Conduct applies to all spaces managed by the Project whether they be physical, online or face-to-face. +This includes project code, code repository, associated web pages, documentation, mailing lists, project websites and wiki pages, +issue tracker, meetings, telecons, events, project social media accounts, and any other forums created by the project team which the +community uses for communication. +In addition, violations of this Code of Conduct outside these spaces may affect a person's ability to participate within them. +Representation of a project may be further defined and clarified by project maintainers. + +## Community Responsibilities +Everyone in the community is empowered to respond to people who are showing unacceptable behavior. +They can talk to them privately or publicly. +Anyone requested to stop unacceptable behavior is expected to comply immediately. +If the behavior continues concerns may be brought to the project administrators or to any other party listed in the +[Reporting](#reporting) section below. + +## Project Administrator Responsibilities +Project administrators are responsible for clarifying the standards of acceptable behavior and are encouraged to model appropriate +behavior and provide support when people in the community point out inappropriate behavior. +Project administrator(s) are normally the ones that would be tasked to carry out the actions in the [Consequences](#consequences) +section below. + +Project administrators are also expected to keep this Code of Conduct updated with the main one housed at UCAR, as listed below in +the [Attribution](#attribution) section. + +## Reporting +Instances of unacceptable behavior can be brought to the attention of the project administrator(s) who may take any action as +outlined in the [Consequences](#consequences) section below. +However, making a report to a project administrator is not considered an 'official report' to UCAR. + +Instances of unacceptable behavior may also be reported directly to UCAR pursuant to [UCAR's Harassment Reporting and Complaint +Procedure](https://www2.fin.ucar.edu/procedures/hr/harassment-reporting-and-complaint-procedure), or anonymously through [UCAR's +EthicsPoint Hotline](https://www2.fin.ucar.edu/ethics/anonymous-reporting). + +Complaints received by UCAR will be handled pursuant to the procedures outlined in UCAR's Harassment Reporting and Complaint +Procedure. +Complaints to UCAR will be held as confidential as practicable under the circumstances, and retaliation against a person who +initiates a complaint or an inquiry about inappropriate behavior will not be tolerated. + +Any Contributor can use these reporting methods even if they are not directly affiliated with UCAR. +The Frequently Asked Questions (FAQ) page for reporting is [here](https://www2.fin.ucar.edu/procedures/hr/reporting-faqs). + +## Consequences +Upon receipt of a complaint, the project administrator(s) may take any action deemed necessary and appropriate under the +circumstances. +Such action can include things such as: removing, editing, or rejecting comments, commits, code, wiki edits, email, issues, and +other contributions that are not aligned to this Code of Conduct, or banning temporarily or permanently any contributor for other +behaviors that are deemed inappropriate, threatening, offensive, or harmful. +Project administrators also have the right to report violations to UCAR HR and/or UCAR's Office of Diversity, Equity and Inclusion +(ODEI), as well as a participant's home institution and/or law enforcement. +In the event an incident is reported to UCAR, UCAR will follow its Harassment Reporting and Complaint Procedure. + +## Process for Changes +All UCAR managed projects are required to adopt this Contributor Code of Conduct. +Adoption is assumed even if not expressly stated in the repository. +Projects should fill in sections where prompted with project-specific information, including, project name and adoption date. + +Projects that adopt this Code of Conduct need to stay up to date with UCAR's Contributor Code of Conduct, linked with a DOI in the +[Attribution](#attribution) section below. +Projects can make limited substantive changes to the Code of Conduct, however, the changes must be limited in scope and may not +contradict the UCAR Contributor Code of Conduct. + +## Attribution +This Code of Conduct was originally adapted from the [Contributor Covenant](http://contributor-covenant.org/version/1/4), version +1.4. +We then aligned it with the UCAR Participant Code of Conduct, which also borrows from the American Geophysical Union (AGU) Code of +Conduct. +The UCAR Participant Code of Conduct applies to both UCAR employees as well as participants in activities run by UCAR. +The original version of this for all software projects that have strong management from UCAR or UCAR staff is available on the UCAR +website at https://doi.org/10.5065/6w2c-a132. +The date that it was adopted by this project was **Feb/13/2018**. +When responding to complaints, UCAR HR and ODEI will do so based on the latest published version. +Therefore, any project-specific changes should follow the [Process for Changes](#process-for-changes) section above. diff --git a/.lib/git-fleximod/git_fleximod/cli.py b/.lib/git-fleximod/git_fleximod/cli.py index a15a226de4..ac9493cfc3 100644 --- a/.lib/git-fleximod/git_fleximod/cli.py +++ b/.lib/git-fleximod/git_fleximod/cli.py @@ -2,27 +2,31 @@ import argparse from git_fleximod import utils -__version__ = "0.7.8" +__version__ = "0.9.3" def find_root_dir(filename=".gitmodules"): """ finds the highest directory in tree which contains a file called filename """ - d = Path.cwd() - root = Path(d.root) - dirlist = [] - dl = d - while dl != root: - dirlist.append(dl) - dl = dl.parent - dirlist.append(root) - dirlist.reverse() - - for dl in dirlist: - attempt = dl / filename - if attempt.is_file(): - return str(dl) - return None - + try: + root = utils.execute_subprocess(["git","rev-parse", "--show-toplevel"], + output_to_caller=True ).rstrip() + except: + d = Path.cwd() + root = Path(d.root) + dirlist = [] + dl = d + while dl != root: + dirlist.append(dl) + dl = dl.parent + dirlist.append(root) + dirlist.reverse() + + for dl in dirlist: + attempt = dl / filename + if attempt.is_file(): + return str(dl) + return None + return Path(root) def get_parser(): description = """ diff --git a/.lib/git-fleximod/git_fleximod/git_fleximod.py b/.lib/git-fleximod/git_fleximod/git_fleximod.py index e1b8f484a5..13f35df959 100755 --- a/.lib/git-fleximod/git_fleximod/git_fleximod.py +++ b/.lib/git-fleximod/git_fleximod/git_fleximod.py @@ -13,14 +13,14 @@ from git_fleximod import cli from git_fleximod.gitinterface import GitInterface from git_fleximod.gitmodules import GitModules -from configparser import NoOptionError +from git_fleximod.submodule import Submodule # logger variable is global logger = None def fxrequired_allowed_values(): - return ["ToplevelRequired", "ToplevelOptional", "AlwaysRequired", "AlwaysOptional"] + return ["ToplevelRequired", "ToplevelOptional", "AlwaysRequired", "AlwaysOptional", "TopLevelRequired", "TopLevelOptional"] def commandline_arguments(args=None): @@ -33,14 +33,9 @@ def commandline_arguments(args=None): # explicitly listing a component overrides the optional flag if options.optional or options.components: - fxrequired = [ - "ToplevelRequired", - "ToplevelOptional", - "AlwaysRequired", - "AlwaysOptional", - ] + fxrequired = fxrequired_allowed_values() else: - fxrequired = ["ToplevelRequired", "AlwaysRequired"] + fxrequired = ["ToplevelRequired", "AlwaysRequired", "TopLevelRequired"] action = options.action if not action: @@ -98,7 +93,8 @@ def submodule_sparse_checkout(root_dir, name, url, path, sparsefile, tag="master """ logger.info("Called sparse_checkout for {}".format(name)) rgit = GitInterface(root_dir, logger) - superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") + superroot = git_toplevelroot(root_dir, logger) + if superroot: gitroot = superroot.strip() else: @@ -128,8 +124,8 @@ def submodule_sparse_checkout(root_dir, name, url, path, sparsefile, tag="master # set the repository remote logger.info("Setting remote origin in {}/{}".format(root_dir, path)) - status = sprepo_git.git_operation("remote", "-v") - if url not in status: + _, remotelist = sprepo_git.git_operation("remote", "-v") + if url not in remotelist: sprepo_git.git_operation("remote", "add", "origin", url) topgit = os.path.join(gitroot, ".git") @@ -154,6 +150,8 @@ def submodule_sparse_checkout(root_dir, name, url, path, sparsefile, tag="master if os.path.isdir(os.path.join(root_dir, path, ".git")): with utils.pushd(sprep_repo): + if os.path.isdir(os.path.join(topgit,".git")): + shutil.rmtree(os.path.join(topgit,".git")) shutil.move(".git", topgit) with open(".git", "w") as f: f.write("gitdir: " + os.path.relpath(topgit)) @@ -166,7 +164,9 @@ def submodule_sparse_checkout(root_dir, name, url, path, sparsefile, tag="master return with utils.pushd(sprep_repo): - shutil.copy(sparsefile, gitsparse) + if os.path.isfile(sparsefile): + shutil.copy(sparsefile, gitsparse) + # Finally checkout the repo sprepo_git.git_operation("fetch", "origin", "--tags") @@ -176,285 +176,82 @@ def submodule_sparse_checkout(root_dir, name, url, path, sparsefile, tag="master rgit.config_set_value(f'submodule "{name}"', "active", "true") rgit.config_set_value(f'submodule "{name}"', "url", url) - -def single_submodule_checkout( - root, name, path, url=None, tag=None, force=False, optional=False -): - """ - This function checks out a single git submodule. - - Parameters: - root (str): The root directory for the git operation. - name (str): The name of the submodule. - path (str): The path to the submodule. - url (str, optional): The URL of the submodule. Defaults to None. - tag (str, optional): The tag to checkout. Defaults to None. - force (bool, optional): If set to True, forces the checkout operation. Defaults to False. - optional (bool, optional): If set to True, the submodule is considered optional. Defaults to False. - - Returns: - None - """ - # function implementation... - git = GitInterface(root, logger) - repodir = os.path.join(root, path) - logger.info("Checkout {} into {}/{}".format(name, root, path)) - # if url is provided update to the new url - tmpurl = None - repo_exists = False - if os.path.exists(os.path.join(repodir, ".git")): - logger.info("Submodule {} already checked out".format(name)) - repo_exists = True - # Look for a .gitmodules file in the newly checkedout repo - if not repo_exists and url: - # ssh urls cause problems for those who dont have git accounts with ssh keys defined - # but cime has one since e3sm prefers ssh to https, because the .gitmodules file was - # opened with a GitModules object we don't need to worry about restoring the file here - # it will be done by the GitModules class - if url.startswith("git@"): - tmpurl = url - url = url.replace("git@github.com:", "https://github.com/") - git.git_operation("clone", url, path) - smgit = GitInterface(repodir, logger) - if not tag: - tag = smgit.git_operation("describe", "--tags", "--always").rstrip() - smgit.git_operation("checkout", tag) - # Now need to move the .git dir to the submodule location - rootdotgit = os.path.join(root, ".git") - if os.path.isfile(rootdotgit): - with open(rootdotgit) as f: - line = f.readline() - if line.startswith("gitdir: "): - rootdotgit = line[8:].rstrip() - - newpath = os.path.abspath(os.path.join(root, rootdotgit, "modules", name)) - if os.path.exists(newpath): - shutil.rmtree(os.path.join(repodir, ".git")) - else: - shutil.move(os.path.join(repodir, ".git"), newpath) - - with open(os.path.join(repodir, ".git"), "w") as f: - f.write("gitdir: " + os.path.relpath(newpath, start=repodir)) - - if not os.path.exists(repodir): - parent = os.path.dirname(repodir) - if not os.path.isdir(parent): - os.makedirs(parent) - git.git_operation("submodule", "add", "--name", name, "--", url, path) - - if not repo_exists or not tmpurl: - git.git_operation("submodule", "update", "--init", "--", path) - - if os.path.exists(os.path.join(repodir, ".gitmodules")): - # recursively handle this checkout - print(f"Recursively checking out submodules of {name}") - gitmodules = GitModules(logger, confpath=repodir) - requiredlist = ["AlwaysRequired"] - if optional: - requiredlist.append("AlwaysOptional") - submodules_checkout(gitmodules, repodir, requiredlist, force=force) - if not os.path.exists(os.path.join(repodir, ".git")): - utils.fatal_error( - f"Failed to checkout {name} {repo_exists} {tmpurl} {repodir} {path}" - ) - - if tmpurl: - print(git.git_operation("restore", ".gitmodules")) - - return - -def add_remote(git, url): - remotes = git.git_operation("remote", "-v") - newremote = "newremote.00" - if url in remotes: - for line in remotes: - if url in line and "fetch" in line: - newremote = line.split()[0] - break - else: - i = 0 - while "newremote" in remotes: - i = i + 1 - newremote = f"newremote.{i:02d}" - git.git_operation("remote", "add", newremote, url) - return newremote - -def submodules_status(gitmodules, root_dir, toplevel=False): +def init_submodule_from_gitmodules(gitmodules, name, root_dir, logger): + path = gitmodules.get(name, "path") + url = gitmodules.get(name, "url") + assert path and url, f"Malformed .gitmodules file {path} {url}" + tag = gitmodules.get(name, "fxtag") + fxurl = gitmodules.get(name, "fxDONOTUSEurl") + fxsparse = gitmodules.get(name, "fxsparse") + fxrequired = gitmodules.get(name, "fxrequired") + return Submodule(root_dir, name, path, url, fxtag=tag, fxurl=fxurl, fxsparse=fxsparse, fxrequired=fxrequired, logger=logger) + +def submodules_status(gitmodules, root_dir, toplevel=False, depth=0): testfails = 0 localmods = 0 needsupdate = 0 + wrapper = textwrap.TextWrapper(initial_indent=' '*(depth*10), width=120,subsequent_indent=' '*(depth*20)) for name in gitmodules.sections(): - path = gitmodules.get(name, "path") - tag = gitmodules.get(name, "fxtag") - url = gitmodules.get(name, "url") - required = gitmodules.get(name, "fxrequired") - level = required and "Toplevel" in required - if not path: - utils.fatal_error("No path found in .gitmodules for {}".format(name)) - newpath = os.path.join(root_dir, path) - logger.debug("newpath is {}".format(newpath)) - if not os.path.exists(os.path.join(newpath, ".git")): - rootgit = GitInterface(root_dir, logger) - # submodule commands use path, not name - url = url.replace("git@github.com:", "https://github.com/") - tags = rootgit.git_operation("ls-remote", "--tags", url) - result = rootgit.git_operation("submodule","status",newpath).split() - ahash = None - if result: - ahash = result[0][1:] - hhash = None - atag = None + submod = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) + + result,n,l,t = submod.status() + if toplevel or not submod.toplevel(): + print(wrapper.fill(result)) + testfails += t + localmods += l + needsupdate += n + subdir = os.path.join(root_dir, submod.path) + if os.path.exists(os.path.join(subdir, ".gitmodules")): + gsubmod = GitModules(logger, confpath=subdir) + t,l,n = submodules_status(gsubmod, subdir, depth=depth+1) + if toplevel or not submod.toplevel(): + testfails += t + localmods += l + needsupdate += n - needsupdate += 1 - if not toplevel and level: - continue - for htag in tags.split("\n"): - if htag.endswith('^{}'): - htag = htag[:-3] - if ahash and not atag and ahash in htag: - atag = (htag.split()[1])[10:] - if tag and not hhash and htag.endswith(tag): - hhash = htag.split()[0] - if hhash and atag: - break - optional = " (optional)" if required and "Optional" in required else "" - if tag and (ahash == hhash or atag == tag): - print(f"e {name:>20} not checked out, aligned at tag {tag}{optional}") - elif tag: - ahash = rootgit.git_operation( - "submodule", "status", "{}".format(path) - ).rstrip() - ahash = ahash[1 : len(tag) + 1] - if tag == ahash: - print(f"e {name:>20} not checked out, aligned at hash {ahash}{optional}") - else: - print( - f"e {name:>20} not checked out, out of sync at tag {atag}, expected tag is {tag}{optional}" - ) - testfails += 1 - else: - print(f"e {name:>20} has no fxtag defined in .gitmodules{optional}") - testfails += 1 - else: - with utils.pushd(newpath): - git = GitInterface(newpath, logger) - atag = git.git_operation("describe", "--tags", "--always").rstrip() - ahash = git.git_operation("rev-list", "HEAD").partition("\n")[0] - rurl = git.git_operation("ls-remote","--get-url").rstrip() - if rurl != url: - remote = add_remote(git, url) - git.git_operation("fetch", remote) - if tag and atag == tag: - print(f" {name:>20} at tag {tag}") - elif tag and ahash[: len(tag)] == tag: - print(f" {name:>20} at hash {ahash}") - elif atag == ahash: - print(f" {name:>20} at hash {ahash}") - elif tag: - print( - f"s {name:>20} {atag} {ahash} is out of sync with .gitmodules {tag}" - ) - testfails += 1 - needsupdate += 1 - else: - print( - f"e {name:>20} has no fxtag defined in .gitmodules, module at {atag}" - ) - testfails += 1 - - status = git.git_operation("status", "--ignore-submodules", "-uno") - if "nothing to commit" not in status: - localmods = localmods + 1 - print("M" + textwrap.indent(status, " ")) - return testfails, localmods, needsupdate +def git_toplevelroot(root_dir, logger): + rgit = GitInterface(root_dir, logger) + _, superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") + return superroot def submodules_update(gitmodules, root_dir, requiredlist, force): - _, localmods, needsupdate = submodules_status(gitmodules, root_dir) - - if localmods and not force: - local_mods_output() - return - if needsupdate == 0: - return - for name in gitmodules.sections(): - fxtag = gitmodules.get(name, "fxtag") - path = gitmodules.get(name, "path") - url = gitmodules.get(name, "url") - logger.info( - "name={} path={} url={} fxtag={} requiredlist={} ".format( - name, os.path.join(root_dir, path), url, fxtag, requiredlist - ) - ) - - fxrequired = gitmodules.get(name, "fxrequired") - assert fxrequired in fxrequired_allowed_values() - rgit = GitInterface(root_dir, logger) - superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") - - fxsparse = gitmodules.get(name, "fxsparse") - + submod = init_submodule_from_gitmodules(gitmodules, name, root_dir, logger) + + _, needsupdate, localmods, testfails = submod.status() + if not submod.fxrequired: + submod.fxrequired = "AlwaysRequired" + fxrequired = submod.fxrequired + allowedvalues = fxrequired_allowed_values() + assert fxrequired in allowedvalues + + superroot = git_toplevelroot(root_dir, logger) + if ( fxrequired - and (superroot and "Toplevel" in fxrequired) - or fxrequired not in requiredlist + and ((superroot and "Toplevel" in fxrequired) + or fxrequired not in requiredlist) ): - if "ToplevelOptional" == fxrequired: - print("Skipping optional component {}".format(name)) - continue - if fxsparse: - logger.debug( - "Callng submodule_sparse_checkout({}, {}, {}, {}, {}, {}".format( - root_dir, name, url, path, fxsparse, fxtag - ) - ) - submodule_sparse_checkout(root_dir, name, url, path, fxsparse, tag=fxtag) - else: - logger.info( - "Calling submodule_checkout({},{},{},{})".format( - root_dir, name, path, url - ) - ) - - single_submodule_checkout( - root_dir, - name, - path, - url=url, - tag=fxtag, - force=force, - optional=("AlwaysOptional" in requiredlist), - ) - - if os.path.exists(os.path.join(path, ".git")): - submoddir = os.path.join(root_dir, path) - with utils.pushd(submoddir): - git = GitInterface(submoddir, logger) - # first make sure the url is correct - upstream = git.git_operation("ls-remote", "--get-url").rstrip() - newremote = "origin" - if upstream != url: - add_remote(git, url) - - tags = git.git_operation("tag", "-l") - if fxtag and fxtag not in tags: - git.git_operation("fetch", newremote, "--tags") - atag = git.git_operation("describe", "--tags", "--always").rstrip() - if fxtag and fxtag != atag: - try: - git.git_operation("checkout", fxtag) - print(f"{name:>20} updated to {fxtag}") - except Exception as error: - print(error) - elif not fxtag: - print(f"No fxtag found for submodule {name:>20}") - else: - print(f"{name:>20} up to date.") - + if "Optional" in fxrequired and "Optional" not in requiredlist: + if fxrequired.startswith("Always"): + print(f"Skipping optional component {name:>20}") + continue + optional = "AlwaysOptional" in requiredlist + if fxrequired in requiredlist: + submod.update() + repodir = os.path.join(root_dir, submod.path) + if os.path.exists(os.path.join(repodir, ".gitmodules")): + # recursively handle this checkout + print(f"Recursively checking out submodules of {name}") + gitsubmodules = GitModules(submod.logger, confpath=repodir) + newrequiredlist = ["AlwaysRequired"] + if optional: + newrequiredlist.append("AlwaysOptional") + submodules_update(gitsubmodules, repodir, newrequiredlist, force=force) def local_mods_output(): text = """\ @@ -469,62 +266,6 @@ def local_mods_output(): """ print(text) - -# checkout is done by update if required so this function may be depricated -def submodules_checkout(gitmodules, root_dir, requiredlist, force=False): - """ - This function checks out all git submodules based on the provided parameters. - - Parameters: - gitmodules (ConfigParser): The gitmodules configuration. - root_dir (str): The root directory for the git operation. - requiredlist (list): The list of required modules. - force (bool, optional): If set to True, forces the checkout operation. Defaults to False. - - Returns: - None - """ - # function implementation... - print("") - _, localmods, needsupdate = submodules_status(gitmodules, root_dir) - if localmods and not force: - local_mods_output() - return - if not needsupdate: - return - for name in gitmodules.sections(): - fxrequired = gitmodules.get(name, "fxrequired") - fxsparse = gitmodules.get(name, "fxsparse") - fxtag = gitmodules.get(name, "fxtag") - path = gitmodules.get(name, "path") - url = gitmodules.get(name, "url") - if fxrequired and fxrequired not in requiredlist: - if "Optional" in fxrequired: - print("Skipping optional component {}".format(name)) - continue - - if fxsparse: - logger.debug( - "Callng submodule_sparse_checkout({}, {}, {}, {}, {}, {}".format( - root_dir, name, url, path, fxsparse, fxtag - ) - ) - submodule_sparse_checkout(root_dir, name, url, path, fxsparse, tag=fxtag) - else: - logger.debug( - "Calling submodule_checkout({},{},{})".format(root_dir, name, path) - ) - single_submodule_checkout( - root_dir, - name, - path, - url=url, - tag=fxtag, - force=force, - optional="AlwaysOptional" in requiredlist, - ) - - def submodules_test(gitmodules, root_dir): """ This function tests the git submodules based on the provided parameters. @@ -547,7 +288,7 @@ def submodules_test(gitmodules, root_dir): # and that sparse checkout files exist for name in gitmodules.sections(): url = gitmodules.get(name, "url") - fxurl = gitmodules.get(name, "fxDONOTMODIFYurl") + fxurl = gitmodules.get(name, "fxDONOTUSEurl") fxsparse = gitmodules.get(name, "fxsparse") path = gitmodules.get(name, "path") fxurl = fxurl[:-4] if fxurl.endswith(".git") else fxurl @@ -601,7 +342,7 @@ def main(): excludelist=excludelist, ) if not gitmodules.sections(): - sys.exit("No submodule components found") + sys.exit(f"No submodule components found, root_dir={root_dir}") retval = 0 if action == "update": submodules_update(gitmodules, root_dir, fxrequired, force) diff --git a/.lib/git-fleximod/git_fleximod/gitinterface.py b/.lib/git-fleximod/git_fleximod/gitinterface.py index 93ae38ecde..fb20883cd0 100644 --- a/.lib/git-fleximod/git_fleximod/gitinterface.py +++ b/.lib/git-fleximod/git_fleximod/gitinterface.py @@ -49,20 +49,31 @@ def _init_git_repo(self): # pylint: disable=unused-argument def git_operation(self, operation, *args, **kwargs): - command = self._git_command(operation, *args) - self.logger.info(command) + newargs = [] + for a in args: + # Do not use ssh interface + if isinstance(a, str): + a = a.replace("git@github.com:", "https://github.com/") + newargs.append(a) + + command = self._git_command(operation, *newargs) if isinstance(command, list): try: - return utils.execute_subprocess(command, output_to_caller=True) + status, output = utils.execute_subprocess(command, status_to_caller=True, output_to_caller=True) + return status, output.rstrip() except Exception as e: sys.exit(e) else: - return command + return 0, command def config_get_value(self, section, name): if self._use_module: config = self.repo.config_reader() - return config.get_value(section, name) + try: + val = config.get_value(section, name) + except: + val = None + return val else: cmd = ("git", "-C", str(self.repo_path), "config", "--get", f"{section}.{name}") output = utils.execute_subprocess(cmd, output_to_caller=True) @@ -71,6 +82,8 @@ def config_get_value(self, section, name): def config_set_value(self, section, name, value): if self._use_module: with self.repo.config_writer() as writer: + if "." in section: + section = section.replace("."," \"")+'"' writer.set_value(section, name, value) writer.release() # Ensure changes are saved else: diff --git a/.lib/git-fleximod/git_fleximod/gitmodules.py b/.lib/git-fleximod/git_fleximod/gitmodules.py index 7e4e05394a..cf8b350dd6 100644 --- a/.lib/git-fleximod/git_fleximod/gitmodules.py +++ b/.lib/git-fleximod/git_fleximod/gitmodules.py @@ -1,4 +1,4 @@ -import shutil +import shutil, os from pathlib import Path from configparser import RawConfigParser, ConfigParser from .lstripreader import LstripReader diff --git a/.lib/git-fleximod/git_fleximod/submodule.py b/.lib/git-fleximod/git_fleximod/submodule.py new file mode 100644 index 0000000000..75d9dd4eb9 --- /dev/null +++ b/.lib/git-fleximod/git_fleximod/submodule.py @@ -0,0 +1,427 @@ +import os +import textwrap +import shutil +import string +from configparser import NoOptionError +from git_fleximod import utils +from git_fleximod.gitinterface import GitInterface + +class Submodule(): + """ + Represents a Git submodule with enhanced features for flexible management. + + Attributes: + name (str): The name of the submodule. + root_dir (str): The root directory of the main project. + path (str): The relative path from the root directory to the submodule. + url (str): The URL of the submodule repository. + fxurl (str): The URL for flexible submodule management (optional). + fxtag (str): The tag for flexible submodule management (optional). + fxsparse (str): Path to the sparse checkout file relative to the submodule path, see git-sparse-checkout for details (optional). + fxrequired (str): Indicates if the submodule is optional or required (optional). + logger (logging.Logger): Logger instance for logging (optional). + """ + def __init__(self, root_dir, name, path, url, fxtag=None, fxurl=None, fxsparse=None, fxrequired=None, logger=None): + """ + Initializes a new Submodule instance with the provided attributes. + """ + self.name = name + self.root_dir = root_dir + self.path = path + self.url = url + self.fxurl = fxurl + self.fxtag = fxtag + self.fxsparse = fxsparse + if fxrequired: + self.fxrequired = fxrequired + else: + self.fxrequired = "AlwaysRequired" + self.logger = logger + + def status(self): + """ + Checks the status of the submodule and returns 4 parameters: + - result (str): The status of the submodule. + - needsupdate (bool): An indicator if the submodule needs to be updated. + - localmods (bool): An indicator if the submodule has local modifications. + - testfails (bool): An indicator if the submodule has failed a test, this is used for testing purposes. + """ + + smpath = os.path.join(self.root_dir, self.path) + testfails = False + localmods = False + needsupdate = False + ahash = None + optional = "" + if "Optional" in self.fxrequired: + optional = " (optional)" + required = None + level = None + if not os.path.exists(os.path.join(smpath, ".git")): + rootgit = GitInterface(self.root_dir, self.logger) + # submodule commands use path, not name + status, tags = rootgit.git_operation("ls-remote", "--tags", self.url) + status, result = rootgit.git_operation("submodule","status",smpath) + result = result.split() + + if result: + ahash = result[0][1:] + hhash = None + atag = None + for htag in tags.split("\n"): + if htag.endswith('^{}'): + htag = htag[:-3] + if ahash and not atag and ahash in htag: + atag = (htag.split()[1])[10:] + if self.fxtag and not hhash and htag.endswith(self.fxtag): + hhash = htag.split()[0] + if hhash and atag: + break + if self.fxtag and (ahash == hhash or atag == self.fxtag): + result = f"e {self.name:>20} not checked out, aligned at tag {self.fxtag}{optional}" + needsupdate = True + elif self.fxtag: + status, ahash = rootgit.git_operation( + "submodule", "status", "{}".format(self.path) + ) + ahash = ahash[1 : len(self.fxtag) + 1] + if self.fxtag == ahash: + result = f"e {self.name:>20} not checked out, aligned at hash {ahash}{optional}" + else: + result = f"e {self.name:>20} not checked out, out of sync at tag {atag}, expected tag is {self.fxtag}{optional}" + testfails = True + needsupdate = True + else: + result = f"e {self.name:>20} has no fxtag defined in .gitmodules{optional}" + testfails = False + else: + with utils.pushd(smpath): + git = GitInterface(smpath, self.logger) + status, remote = git.git_operation("remote") + if remote == '': + result = f"e {self.name:>20} has no associated remote" + testfails = True + needsupdate = True + return result, needsupdate, localmods, testfails + status, rurl = git.git_operation("ls-remote","--get-url") + status, lines = git.git_operation("log", "--pretty=format:\"%h %d\"") + line = lines.partition('\n')[0] + parts = line.split() + ahash = parts[0][1:] + atag = None + if len(parts) > 3: + idx = 0 + while idx < len(parts)-1: + idx = idx+1 + if parts[idx] == 'tag:': + atag = parts[idx+1] + while atag.endswith(')') or atag.endswith(',') or atag.endswith("\""): + atag = atag[:-1] + if atag == self.fxtag: + break + + + #print(f"line is {line} ahash is {ahash} atag is {atag} {parts}") + # atag = git.git_operation("describe", "--tags", "--always") + # ahash = git.git_operation("rev-list", "HEAD").partition("\n")[0] + + recurse = False + if rurl != self.url: + remote = self._add_remote(git) + git.git_operation("fetch", remote) + if self.fxtag and atag == self.fxtag: + result = f" {self.name:>20} at tag {self.fxtag}" + recurse = True + testfails = False + elif self.fxtag and (ahash[: len(self.fxtag)] == self.fxtag or (self.fxtag.find(ahash)==0)): + result = f" {self.name:>20} at hash {ahash}" + recurse = True + testfails = False + elif atag == ahash: + result = f" {self.name:>20} at hash {ahash}" + recurse = True + elif self.fxtag: + result = f"s {self.name:>20} {atag} {ahash} is out of sync with .gitmodules {self.fxtag}" + testfails = True + needsupdate = True + else: + if atag: + result = f"e {self.name:>20} has no fxtag defined in .gitmodules, module at {atag}" + else: + result = f"e {self.name:>20} has no fxtag defined in .gitmodules, module at {ahash}" + testfails = False + + status, output = git.git_operation("status", "--ignore-submodules", "-uno") + if "nothing to commit" not in output: + localmods = True + result = "M" + textwrap.indent(output, " ") +# print(f"result {result} needsupdate {needsupdate} localmods {localmods} testfails {testfails}") + return result, needsupdate, localmods, testfails + + + def _add_remote(self, git): + """ + Adds a new remote to the submodule if it does not already exist. + + This method checks the existing remotes of the submodule. If the submodule's URL is not already listed as a remote, + it attempts to add a new remote. The name for the new remote is generated dynamically to avoid conflicts. If no + remotes exist, it defaults to naming the new remote 'origin'. + + Args: + git (GitInterface): An instance of GitInterface to perform git operations. + + Returns: + str: The name of the new remote if added, or the name of the existing remote that matches the submodule's URL. + """ + status, remotes = git.git_operation("remote", "-v") + remotes = remotes.splitlines() + upstream = None + if remotes: + status, upstream = git.git_operation("ls-remote", "--get-url") + newremote = "newremote.00" + tmpurl = self.url.replace("git@github.com:", "https://github.com/") + line = next((s for s in remotes if self.url in s or tmpurl in s), None) + if line: + newremote = line.split()[0] + return newremote + else: + i = 0 + while newremote in remotes: + i = i + 1 + newremote = f"newremote.{i:02d}" + else: + newremote = "origin" + git.git_operation("remote", "add", newremote, self.url) + return newremote + + def toplevel(self): + """ + Returns True if the submodule is Toplevel (either Required or Optional) + """ + return True if "Top" in self.fxrequired else False + + def sparse_checkout(self): + """ + Performs a sparse checkout of the submodule. + + This method optimizes the checkout process by only checking out files specified in the submodule's sparse-checkout configuration, + rather than the entire submodule content. It achieves this by first ensuring the `.git/info/sparse-checkout` file is created and + configured in the submodule's directory. Then, it proceeds to checkout the desired tag. If the submodule has already been checked out, + this method will not perform the checkout again. + + This approach is particularly beneficial for submodules with a large number of files, as it significantly reduces the time and disk space + required for the checkout process by avoiding the unnecessary checkout and subsequent removal of unneeded files. + + Returns: + None + """ + self.logger.info("Called sparse_checkout for {}".format(self.name)) + rgit = GitInterface(self.root_dir, self.logger) + status, superroot = rgit.git_operation("rev-parse", "--show-superproject-working-tree") + if superroot: + gitroot = superroot.strip() + else: + gitroot = self.root_dir + # Now need to move the .git dir to the submodule location + rootdotgit = os.path.join(self.root_dir, ".git") + while os.path.isfile(rootdotgit): + with open(rootdotgit) as f: + line = f.readline().rstrip() + if line.startswith("gitdir: "): + rootdotgit = os.path.abspath(os.path.join(self.root_dir,line[8:])) + assert os.path.isdir(rootdotgit) + # first create the module directory + if not os.path.isdir(os.path.join(self.root_dir, self.path)): + os.makedirs(os.path.join(self.root_dir, self.path)) + + # initialize a new git repo and set the sparse checkout flag + sprep_repo = os.path.join(self.root_dir, self.path) + sprepo_git = GitInterface(sprep_repo, self.logger) + if os.path.exists(os.path.join(sprep_repo, ".git")): + try: + self.logger.info("Submodule {} found".format(self.name)) + chk = sprepo_git.config_get_value("core", "sparseCheckout") + if chk == "true": + self.logger.info("Sparse submodule {} already checked out".format(self.name)) + return + except (NoOptionError): + self.logger.debug("Sparse submodule {} not present".format(self.name)) + except Exception as e: + utils.fatal_error("Unexpected error {} occured.".format(e)) + + sprepo_git.config_set_value("core", "sparseCheckout", "true") + + # set the repository remote + + self.logger.info("Setting remote origin in {}/{}".format(self.root_dir, self.path)) + status, remotes = sprepo_git.git_operation("remote", "-v") + if self.url not in remotes: + sprepo_git.git_operation("remote", "add", "origin", self.url) + + topgit = os.path.join(gitroot, ".git") + + if gitroot != self.root_dir and os.path.isfile(os.path.join(self.root_dir, ".git")): + with open(os.path.join(self.root_dir, ".git")) as f: + gitpath = os.path.relpath( + os.path.join(self.root_dir, f.read().split()[1]), + start=os.path.join(self.root_dir, self.path), + ) + rootdotgit = os.path.join(gitpath, "modules", self.name) + else: + rootdotgit = os.path.relpath( + os.path.join(self.root_dir, ".git", "modules", self.name), + start=os.path.join(self.root_dir, self.path), + ) + + if os.path.isdir(os.path.join(self.root_dir, self.path, ".git")): + with utils.pushd(sprep_repo): + if os.path.isdir(os.path.join(rootdotgit,".git")): + shutil.rmtree(os.path.join(rootdotgit,".git")) + shutil.move(".git", rootdotgit) + with open(".git", "w") as f: + f.write("gitdir: " + os.path.relpath(rootdotgit)) + infodir = os.path.join(rootdotgit, "info") + if not os.path.isdir(infodir): + os.makedirs(infodir) + gitsparse = os.path.abspath(os.path.join(infodir, "sparse-checkout")) + if os.path.isfile(gitsparse): + self.logger.warning( + "submodule {} is already initialized {}".format(self.name, rootdotgit) + ) + return + + with utils.pushd(sprep_repo): + if os.path.isfile(self.fxsparse): + + shutil.copy(self.fxsparse, gitsparse) + + + # Finally checkout the repo + sprepo_git.git_operation("fetch", "origin", "--tags") + status,_ = sprepo_git.git_operation("checkout", self.fxtag) + if status: + print(f"Error checking out {self.name:>20} at {self.fxtag}") + else: + print(f"Successfully checked out {self.name:>20} at {self.fxtag}") + rgit.config_set_value('submodule.' + self.name, "active", "true") + rgit.config_set_value('submodule.' + self.name, "url", self.url) + rgit.config_set_value('submodule.' + self.name, "path", self.path) + + def update(self): + """ + Updates the submodule to the latest or specified version. + + This method handles the update process of the submodule, including checking out the submodule into the specified path, + handling sparse checkouts if configured, and updating the submodule's URL if necessary. It supports both SSH and HTTPS URLs, + automatically converting SSH URLs to HTTPS to avoid issues for users without SSH keys. + + The update process involves the following steps: + 1. If the submodule is configured for sparse checkout, it performs a sparse checkout. + 2. If the submodule is not already checked out, it clones the submodule using the provided URL. + 3. If a specific tag or hash is provided, it checks out that tag; otherwise, it checks out the latest version. + 4. If the root `.git` is a file (indicating a submodule or a worktree), additional steps are taken to integrate the submodule properly. + + Args: + None + Note: + - SSH URLs are automatically converted to HTTPS to accommodate users without SSH keys. + + Returns: + None + """ + git = GitInterface(self.root_dir, self.logger) + repodir = os.path.join(self.root_dir, self.path) + self.logger.info("Checkout {} into {}/{}".format(self.name, self.root_dir, self.path)) + # if url is provided update to the new url + tag = None + repo_exists = False + if os.path.exists(os.path.join(repodir, ".git")): + self.logger.info("Submodule {} already checked out".format(self.name)) + repo_exists = True + # Look for a .gitmodules file in the newly checkedout repo + if self.fxsparse: + print(f"Sparse checkout {self.name} fxsparse {self.fxsparse}") + self.sparse_checkout() + else: + if not repo_exists and self.url: + # ssh urls cause problems for those who dont have git accounts with ssh keys defined + # but cime has one since e3sm prefers ssh to https, because the .gitmodules file was + # opened with a GitModules object we don't need to worry about restoring the file here + # it will be done by the GitModules class + if self.url.startswith("git@"): + git.git_operation("clone", self.url, self.path) + smgit = GitInterface(repodir, self.logger) + if not tag: + status, tag = smgit.git_operation("describe", "--tags", "--always") + smgit.git_operation("checkout", tag) + # Now need to move the .git dir to the submodule location + rootdotgit = os.path.join(self.root_dir, ".git") + if os.path.isfile(rootdotgit): + with open(rootdotgit) as f: + line = f.readline() + if line.startswith("gitdir: "): + rootdotgit = line[8:] + + newpath = os.path.abspath(os.path.join(self.root_dir, rootdotgit, "modules", self.name)) + if os.path.exists(newpath): + shutil.rmtree(os.path.join(repodir, ".git")) + else: + shutil.move(os.path.join(repodir, ".git"), newpath) + + with open(os.path.join(repodir, ".git"), "w") as f: + f.write("gitdir: " + os.path.relpath(newpath, start=repodir)) + + if not os.path.exists(repodir): + parent = os.path.dirname(repodir) + if not os.path.isdir(parent): + os.makedirs(parent) + git.git_operation("submodule", "add", "--name", self.name, "--", self.url, self.path) + + if not repo_exists: + git.git_operation("submodule", "update", "--init", "--", self.path) + + if self.fxtag: + smgit = GitInterface(repodir, self.logger) + newremote = self._add_remote(smgit) + # Trying to distingush a tag from a hash + allowed = set(string.digits + 'abcdef') + if not set(self.fxtag) <= allowed: + # This is a tag + tag = f"refs/tags/{self.fxtag}:refs/tags/{self.fxtag}" + smgit.git_operation("fetch", newremote, tag) + smgit.git_operation("checkout", self.fxtag) + + if not os.path.exists(os.path.join(repodir, ".git")): + utils.fatal_error( + f"Failed to checkout {self.name} {repo_exists} {repodir} {self.path}" + ) + + + if os.path.exists(os.path.join(self.path, ".git")): + submoddir = os.path.join(self.root_dir, self.path) + with utils.pushd(submoddir): + git = GitInterface(submoddir, self.logger) + # first make sure the url is correct + newremote = self._add_remote(git) + status, tags = git.git_operation("tag", "-l") + fxtag = self.fxtag + if fxtag and fxtag not in tags: + git.git_operation("fetch", newremote, "--tags") + status, atag = git.git_operation("describe", "--tags", "--always") + if fxtag and fxtag != atag: + try: + status, _ = git.git_operation("checkout", fxtag) + if not status: + print(f"{self.name:>20} updated to {fxtag}") + except Exception as error: + print(error) + + + elif not fxtag: + print(f"No fxtag found for submodule {self.name:>20}") + else: + print(f"{self.name:>20} up to date.") + + + + return diff --git a/.lib/git-fleximod/git_fleximod/utils.py b/.lib/git-fleximod/git_fleximod/utils.py index 1a2d5ccf2f..c4f43d5238 100644 --- a/.lib/git-fleximod/git_fleximod/utils.py +++ b/.lib/git-fleximod/git_fleximod/utils.py @@ -307,12 +307,12 @@ def execute_subprocess(commands, status_to_caller=False, output_to_caller=False) # simple status check. If returning, it is the callers # responsibility determine if an error occurred and handle it # appropriately. + msg_context = ( + "Process did not run successfully; " + "returned status {0}".format(error.returncode) + ) + msg = failed_command_msg(msg_context, commands, output=error.output) if not return_to_caller: - msg_context = ( - "Process did not run successfully; " - "returned status {0}".format(error.returncode) - ) - msg = failed_command_msg(msg_context, commands, output=error.output) logging.error(error) logging.error(msg) log_process_output(error.output) diff --git a/.lib/git-fleximod/poetry.lock b/.lib/git-fleximod/poetry.lock index b59ed3942c..ac82fb0d97 100644 --- a/.lib/git-fleximod/poetry.lock +++ b/.lib/git-fleximod/poetry.lock @@ -13,13 +13,13 @@ files = [ [[package]] name = "babel" -version = "2.14.0" +version = "2.15.0" description = "Internationalization utilities" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "Babel-2.14.0-py3-none-any.whl", hash = "sha256:efb1a25b7118e67ce3a259bed20545c29cb68be8ad2c784c83689981b7a57287"}, - {file = "Babel-2.14.0.tar.gz", hash = "sha256:6919867db036398ba21eb5c7a0f6b28ab8cbc3ae7a73a44ebe34ae74a4e7d363"}, + {file = "Babel-2.15.0-py3-none-any.whl", hash = "sha256:08706bdad8d0a3413266ab61bd6c34d0c28d6e1e7badf40a2cebe67644e2e1fb"}, + {file = "babel-2.15.0.tar.gz", hash = "sha256:8daf0e265d05768bc6c7a314cf1321e9a123afc328cc635c18622a2f30a04413"}, ] [package.dependencies] @@ -30,13 +30,13 @@ dev = ["freezegun (>=1.0,<2.0)", "pytest (>=6.0)", "pytest-cov"] [[package]] name = "certifi" -version = "2024.2.2" +version = "2024.8.30" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, + {file = "certifi-2024.8.30-py3-none-any.whl", hash = "sha256:922820b53db7a7257ffbda3f597266d435245903d80737e34f8a45ff3e3230d8"}, + {file = "certifi-2024.8.30.tar.gz", hash = "sha256:bec941d2aa8195e248a60b31ff9f0558284cf01a52591ceda73ea9afffd69fd9"}, ] [[package]] @@ -162,13 +162,13 @@ files = [ [[package]] name = "exceptiongroup" -version = "1.2.0" +version = "1.2.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" files = [ - {file = "exceptiongroup-1.2.0-py3-none-any.whl", hash = "sha256:4bfd3996ac73b41e9b9628b04e079f193850720ea5945fc96a08633c66912f14"}, - {file = "exceptiongroup-1.2.0.tar.gz", hash = "sha256:91f5c769735f051a4290d52edd0858999b57e5876e9f85937691bd4c9fa3ed68"}, + {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, + {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, ] [package.extras] @@ -225,30 +225,31 @@ smmap = ">=3.0.1,<6" [[package]] name = "gitpython" -version = "3.1.41" +version = "3.1.43" description = "GitPython is a Python library used to interact with Git repositories" optional = false python-versions = ">=3.7" files = [ - {file = "GitPython-3.1.41-py3-none-any.whl", hash = "sha256:c36b6634d069b3f719610175020a9aed919421c87552185b085e04fbbdb10b7c"}, - {file = "GitPython-3.1.41.tar.gz", hash = "sha256:ed66e624884f76df22c8e16066d567aaa5a37d5b5fa19db2c6df6f7156db9048"}, + {file = "GitPython-3.1.43-py3-none-any.whl", hash = "sha256:eec7ec56b92aad751f9912a73404bc02ba212a23adb2c7098ee668417051a1ff"}, + {file = "GitPython-3.1.43.tar.gz", hash = "sha256:35f314a9f878467f5453cc1fee295c3e18e52f1b99f10f6cf5b1682e968a9e7c"}, ] [package.dependencies] gitdb = ">=4.0.1,<5" [package.extras] -test = ["black", "coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "sumtypes"] +doc = ["sphinx (==4.3.2)", "sphinx-autodoc-typehints", "sphinx-rtd-theme", "sphinxcontrib-applehelp (>=1.0.2,<=1.0.4)", "sphinxcontrib-devhelp (==1.0.2)", "sphinxcontrib-htmlhelp (>=2.0.0,<=2.0.1)", "sphinxcontrib-qthelp (==1.0.3)", "sphinxcontrib-serializinghtml (==1.1.5)"] +test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions"] [[package]] name = "idna" -version = "3.6" +version = "3.7" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.5" files = [ - {file = "idna-3.6-py3-none-any.whl", hash = "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f"}, - {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, + {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, + {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, ] [[package]] @@ -264,22 +265,22 @@ files = [ [[package]] name = "importlib-metadata" -version = "7.0.1" +version = "8.0.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "importlib_metadata-7.0.1-py3-none-any.whl", hash = "sha256:4805911c3a4ec7c3966410053e9ec6a1fecd629117df5adee56dfc9432a1081e"}, - {file = "importlib_metadata-7.0.1.tar.gz", hash = "sha256:f238736bb06590ae52ac1fab06a3a9ef1d8dce2b7a35b5ab329371d6c8f5d2cc"}, + {file = "importlib_metadata-8.0.0-py3-none-any.whl", hash = "sha256:15584cf2b1bf449d98ff8a6ff1abef57bf20f3ac6454f431736cd3e660921b2f"}, + {file = "importlib_metadata-8.0.0.tar.gz", hash = "sha256:188bd24e4c346d3f0a933f275c2fec67050326a856b9a359881d7c2a697e8812"}, ] [package.dependencies] zipp = ">=0.5" [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] +test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-perf (>=0.9.2)", "pytest-ruff (>=0.2.1)"] [[package]] name = "iniconfig" @@ -294,13 +295,13 @@ files = [ [[package]] name = "jinja2" -version = "3.1.3" +version = "3.1.4" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" files = [ - {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, - {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, + {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"}, + {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"}, ] [package.dependencies] @@ -380,24 +381,24 @@ files = [ [[package]] name = "packaging" -version = "23.2" +version = "24.1" description = "Core utilities for Python packages" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"}, - {file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"}, + {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, + {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, ] [[package]] name = "pluggy" -version = "1.4.0" +version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ - {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, - {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, ] [package.extras] @@ -406,39 +407,38 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pyfakefs" -version = "5.3.5" +version = "5.5.0" description = "pyfakefs implements a fake file system that mocks the Python file system modules." optional = false python-versions = ">=3.7" files = [ - {file = "pyfakefs-5.3.5-py3-none-any.whl", hash = "sha256:751015c1de94e1390128c82b48cdedc3f088bbdbe4bc713c79d02a27f0f61e69"}, - {file = "pyfakefs-5.3.5.tar.gz", hash = "sha256:7cdc500b35a214cb7a614e1940543acc6650e69a94ac76e30f33c9373bd9cf90"}, + {file = "pyfakefs-5.5.0-py3-none-any.whl", hash = "sha256:8dbf203ab7bef1529f11f7d41b9478b898e95bf9f3b71262163aac07a518cd76"}, + {file = "pyfakefs-5.5.0.tar.gz", hash = "sha256:7448aaa07142f892d0a4eb52a5ed3206a9f02c6599e686cd97d624c18979c154"}, ] [[package]] name = "pygments" -version = "2.17.2" +version = "2.18.0" description = "Pygments is a syntax highlighting package written in Python." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, - {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, + {file = "pygments-2.18.0-py3-none-any.whl", hash = "sha256:b8e6aca0523f3ab76fee51799c488e38782ac06eafcf95e7ba832985c8e7b13a"}, + {file = "pygments-2.18.0.tar.gz", hash = "sha256:786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"}, ] [package.extras] -plugins = ["importlib-metadata"] windows-terminal = ["colorama (>=0.4.6)"] [[package]] name = "pytest" -version = "8.0.0" +version = "8.2.2" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.0.0-py3-none-any.whl", hash = "sha256:50fb9cbe836c3f20f0dfa99c565201fb75dc54c8d76373cd1bde06b06657bdb6"}, - {file = "pytest-8.0.0.tar.gz", hash = "sha256:249b1b0864530ba251b7438274c4d251c58d868edaaec8762893ad4a0d71c36c"}, + {file = "pytest-8.2.2-py3-none-any.whl", hash = "sha256:c434598117762e2bd304e526244f67bf66bbd7b5d6cf22138be51ff661980343"}, + {file = "pytest-8.2.2.tar.gz", hash = "sha256:de4bb8104e201939ccdc688b27a89a7be2079b22e2bd2b07f806b6ba71117977"}, ] [package.dependencies] @@ -446,11 +446,11 @@ colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.3.0,<2.0" -tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} +pluggy = ">=1.5,<2.0" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] -testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytz" @@ -465,13 +465,13 @@ files = [ [[package]] name = "requests" -version = "2.31.0" +version = "2.32.3" description = "Python HTTP for Humans." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, - {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, + {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, + {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, ] [package.dependencies] @@ -643,13 +643,13 @@ files = [ [[package]] name = "urllib3" -version = "2.2.0" +version = "2.2.2" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.2.0-py3-none-any.whl", hash = "sha256:ce3711610ddce217e6d113a2732fafad960a03fd0318c91faa79481e35c11224"}, - {file = "urllib3-2.2.0.tar.gz", hash = "sha256:051d961ad0c62a94e50ecf1af379c3aba230c66c710493493560c0c223c49f20"}, + {file = "urllib3-2.2.2-py3-none-any.whl", hash = "sha256:a448b2f64d686155468037e1ace9f2d2199776e17f0a46610480d311f73e3472"}, + {file = "urllib3-2.2.2.tar.gz", hash = "sha256:dd505485549a7a552833da5e6063639d0d177c04f23bc3864e41e5dc5f612168"}, ] [package.extras] @@ -674,18 +674,18 @@ test = ["pytest (>=6.0.0)", "setuptools (>=65)"] [[package]] name = "zipp" -version = "3.17.0" +version = "3.19.2" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" files = [ - {file = "zipp-3.17.0-py3-none-any.whl", hash = "sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31"}, - {file = "zipp-3.17.0.tar.gz", hash = "sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0"}, + {file = "zipp-3.19.2-py3-none-any.whl", hash = "sha256:f091755f667055f2d02b32c53771a7a6c8b47e1fdbc4b72a8b9072b3eef8015c"}, + {file = "zipp-3.19.2.tar.gz", hash = "sha256:bf1dcf6450f873a13e952a29504887c89e6de7506209e5b1bcc3460135d4de19"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] +doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [metadata] lock-version = "2.0" diff --git a/.lib/git-fleximod/pyproject.toml b/.lib/git-fleximod/pyproject.toml index 5b1332549c..1d0419ad20 100644 --- a/.lib/git-fleximod/pyproject.toml +++ b/.lib/git-fleximod/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "git-fleximod" -version = "0.7.8" +version = "0.9.3" description = "Extended support for git-submodule and git-sparse-checkout" authors = ["Jim Edwards "] maintainers = ["Jim Edwards "] diff --git a/.lib/git-fleximod/tbump.toml b/.lib/git-fleximod/tbump.toml index c4f7ac96ea..b432206a54 100644 --- a/.lib/git-fleximod/tbump.toml +++ b/.lib/git-fleximod/tbump.toml @@ -2,7 +2,7 @@ github_url = "https://github.com/jedwards4b/git-fleximod/" [version] -current = "0.7.8" +current = "0.9.3" # Example of a semver regexp. # Make sure this matches current_version before diff --git a/.lib/git-fleximod/tests/conftest.py b/.lib/git-fleximod/tests/conftest.py index 65ee85d23d..1dd1b86f34 100644 --- a/.lib/git-fleximod/tests/conftest.py +++ b/.lib/git-fleximod/tests/conftest.py @@ -32,7 +32,7 @@ def logger(): "submodule_name": "test_optional", "status1" : "test_optional MPIserial_2.5.0-3-gd82ce7c is out of sync with .gitmodules MPIserial_2.4.0", "status2" : "test_optional at tag MPIserial_2.4.0", - "status3" : "test_optional not checked out, out of sync at tag None, expected tag is MPIserial_2.4.0 (optional)", + "status3" : "test_optional not checked out, out of sync at tag MPIserial_2.5.1, expected tag is MPIserial_2.4.0 (optional)", "status4" : "test_optional at tag MPIserial_2.4.0", "gitmodules_content": """ [submodule "test_optional"] @@ -46,7 +46,7 @@ def logger(): "submodule_name": "test_alwaysoptional", "status1" : "test_alwaysoptional MPIserial_2.3.0 is out of sync with .gitmodules e5cf35c", "status2" : "test_alwaysoptional at hash e5cf35c", - "status3" : "out of sync at tag None, expected tag is e5cf35c", + "status3" : "out of sync at tag MPIserial_2.5.1, expected tag is e5cf35c", "status4" : "test_alwaysoptional at hash e5cf35c", "gitmodules_content": """ [submodule "test_alwaysoptional"] @@ -119,8 +119,20 @@ def complex_repo(tmp_path, logger): str_path = str(test_dir) gitp = GitInterface(str_path, logger) gitp.git_operation("remote", "add", "origin", "https://github.com/jedwards4b/fleximod-test2") - gitp.git_operation("fetch", "origin", "main") - gitp.git_operation("checkout", "main") + gitp.git_operation("fetch", "origin") + gitp.git_operation("checkout", "v0.0.1") + return test_dir + +@pytest.fixture +def complex_update(tmp_path, logger): + test_dir = tmp_path / "testcomplex" + test_dir.mkdir() + str_path = str(test_dir) + gitp = GitInterface(str_path, logger) + gitp.git_operation("remote", "add", "origin", "https://github.com/jedwards4b/fleximod-test2") + gitp.git_operation("fetch", "origin") + gitp.git_operation("checkout", "v0.0.2") + return test_dir @pytest.fixture diff --git a/.lib/git-fleximod/tests/test_e_complex_update.py b/.lib/git-fleximod/tests/test_e_complex_update.py new file mode 100644 index 0000000000..0c3ab4c6a6 --- /dev/null +++ b/.lib/git-fleximod/tests/test_e_complex_update.py @@ -0,0 +1,69 @@ +import pytest +from pathlib import Path +from git_fleximod.gitinterface import GitInterface + +def test_complex_update(git_fleximod, complex_update, logger): + status = git_fleximod(complex_update, "status") + assert("ToplevelOptional not checked out, aligned at tag v5.3.2" in status.stdout) + assert("ToplevelRequired not checked out, aligned at tag MPIserial_2.5.0" in status.stdout) + assert("AlwaysRequired not checked out, aligned at tag MPIserial_2.4.0" in status.stdout) + assert("Complex not checked out, out of sync at tag testtag02, expected tag is testtag3" in status.stdout) + assert("AlwaysOptional not checked out, out of sync at tag None, expected tag is MPIserial_2.3.0" in status.stdout) + + # This should checkout and update test_submodule and complex_sub + result = git_fleximod(complex_update, "update") + assert result.returncode == 0 + + status = git_fleximod(complex_update, "status") + assert("ToplevelOptional not checked out, aligned at tag v5.3.2" in status.stdout) + assert("ToplevelRequired at tag MPIserial_2.5.0" in status.stdout) + assert("AlwaysRequired at tag MPIserial_2.4.0" in status.stdout) + assert("Complex at tag testtag3" in status.stdout) + + # now check the complex_sub + root = (complex_update / "modules" / "complex") + assert(not (root / "libraries" / "gptl" / ".git").exists()) + assert(not (root / "libraries" / "mpi-serial" / ".git").exists()) + assert((root / "modules" / "mpi-serialAR" / ".git").exists()) + assert((root / "modules" / "mpi-serialSAR" / ".git").exists()) + assert(not (root / "modules" / "mpi-serial2" / ".git").exists()) + assert((root / "modules" / "mpi-sparse" / ".git").exists()) + assert((root / "modules" / "mpi-sparse" / "m4").exists()) + assert(not (root / "modules" / "mpi-sparse" / "README").exists()) + + # update a single optional submodule + + result = git_fleximod(complex_update, "update ToplevelOptional") + assert result.returncode == 0 + + status = git_fleximod(complex_update, "status") + assert("ToplevelOptional at tag v5.3.2" in status.stdout) + assert("ToplevelRequired at tag MPIserial_2.5.0" in status.stdout) + assert("AlwaysRequired at tag MPIserial_2.4.0" in status.stdout) + assert("Complex at tag testtag3" in status.stdout) + assert("AlwaysOptional not checked out, out of sync at tag None, expected tag is MPIserial_2.3.0" in status.stdout) + + # Finally update optional + result = git_fleximod(complex_update, "update --optional") + assert result.returncode == 0 + + status = git_fleximod(complex_update, "status") + assert("ToplevelOptional at tag v5.3.2" in status.stdout) + assert("ToplevelRequired at tag MPIserial_2.5.0" in status.stdout) + assert("AlwaysRequired at tag MPIserial_2.4.0" in status.stdout) + assert("Complex at tag testtag3" in status.stdout) + assert("AlwaysOptional at tag MPIserial_2.3.0" in status.stdout) + + # now check the complex_sub + root = (complex_update / "modules" / "complex" ) + assert(not (root / "libraries" / "gptl" / ".git").exists()) + assert(not (root / "libraries" / "mpi-serial" / ".git").exists()) + assert(not (root / "modules" / "mpi-serial" / ".git").exists()) + assert((root / "modules" / "mpi-serialAR" / ".git").exists()) + assert((root / "modules" / "mpi-serialSAR" / ".git").exists()) + assert((root / "modules" / "mpi-sparse" / ".git").exists()) + assert((root / "modules" / "mpi-serial2" / ".git").exists()) + assert((root / "modules" / "mpi-sparse" / "m4").exists()) + assert(not (root / "modules" / "mpi-sparse" / "README").exists()) + + diff --git a/README b/README index c5c06daae7..af8f2cbaaa 100644 --- a/README +++ b/README @@ -126,9 +126,9 @@ cime_config/config_tests.xml ----- Define CTSM specific tests cime_config/config_pes.xml ------- Define Processor layouts for various CTSM grids and compsets cime_config/testdefs ------------- Directory for specification of CTSM testing cime_config/testdefs/ExpectedTestFails.xml -- List of tests that are expected to fail -cime_config/usermods_dirs -------- Directories of sets of user-modification subdirs +cime_config/usermods_dirs/clm ---- Directories of sets of user-modification subdirs (These are directories that add specific user modifications to - simulations created using "cime/scripts/create_newcase --user-mods-dir".) + simulations created using "cime/scripts/create_newcase --user-mods-dir clm/*) tools/mksurfdata_esmf --------- Directory to build program to create surface dataset at any resolution. diff --git a/bld/CLMBuildNamelist.pm b/bld/CLMBuildNamelist.pm index cfdb4e9278..ab0aab0cc5 100755 --- a/bld/CLMBuildNamelist.pm +++ b/bld/CLMBuildNamelist.pm @@ -71,7 +71,7 @@ REQUIRED OPTIONS (if read they allow user_nl_clm and CLM_BLDNML_OPTS to expand variables [for example to use \$DIN_LOC_ROOT]) (default current directory) - -lnd_frac "domainfile" Land fraction file (the input domain file) (needed for LILAC) + -lnd_frac "domainfile" Land fraction file (the input domain file) (only needed with --lilac option) -res "resolution" Specify horizontal grid. Use nlatxnlon for spectral grids; dlatxdlon for fv grids (dlat and dlon are the grid cell size in degrees for latitude and longitude respectively) @@ -678,6 +678,18 @@ sub setup_cmdl_chk_res { } } +#------------------------------------------------------------------------------- + +sub begins_with +{ + # Arguments: long-string, substring + # For an input long-string check if it starts with the substring + # For example, if a string like NEON_PRISM starts with NEON + return substr($_[0], 0, length($_[1])) eq $_[1]; +} + +#------------------------------------------------------------------------------- + sub setup_cmdl_resolution { my ($opts, $nl_flags, $definition, $defaults, $envxml_ref) = @_; @@ -713,7 +725,7 @@ sub setup_cmdl_resolution { $nl_flags->{'neon'} = ".false."; $nl_flags->{'neonsite'} = ""; if ( $nl_flags->{'res'} eq "CLM_USRDAT" ) { - if ( $opts->{'clm_usr_name'} eq "NEON" ) { + if ( begins_with($opts->{'clm_usr_name'}, "NEON") ) { $nl_flags->{'neon'} = ".true."; $nl_flags->{'neonsite'} = $envxml_ref->{'NEONSITE'}; $log->verbose_message( "This is a NEON site with NEONSITE = " . $nl_flags->{'neonsite'} ); @@ -1989,7 +2001,7 @@ sub setup_logic_lnd_frac { "env variables) AND fatmlndfrac on namelist"); } if ( $opts->{$var} =~ /UNSET/ ) { - $log->fatal_error("-lnd_frac was set as UNSET in the CTSM build-namelist set it with the env variables: LND_DOMAIN_PATH/LND_DOMAIN_FILE."); + $log->fatal_error("-lnd_frac was set as UNSET in the CTSM build-namelist, it's required with the --lilac option"); } my $lnd_frac = SetupTools::expand_xml_var( $opts->{$var}, $envxml_ref); add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fatmlndfrc','val'=>$lnd_frac ); @@ -1999,20 +2011,22 @@ sub setup_logic_lnd_frac { if (defined $nl->get_value('fatmlndfrc')) { # do nothing - use value provided by config_grid.xml and clm.cpl7.template } else { - $log->fatal_error("fatmlndfrc was NOT sent into CLM build-namelist."); + $log->fatal_error("fatmlndfrc was NOT sent into CLM build-namelist, it is required for the --lilac option."); } # # For the NUOPC driver neither lnd_frac nor fatmlndfrc need to be set # - } else { + } elsif ($opts->{'driver'} eq "nuopc" ) { if ( defined($opts->{$var}) ) { if ( $opts->{$var} !~ /UNSET/ ) { - $log->fatal_error("$var should NOT be set for the NUOPC driver as it is unused" ); + $log->fatal_error("$var should NOT be set for the NUOPC driver as it is unused (only used by the --lilac option)" ); } } if ( defined($nl->get_value('fatmlndfrc')) ) { $log->fatal_error("fatmlndfrac should NOT be set in the namelist for the NUOPC driver as it is unused" ); } + } else { + $log->fatal_error("Input --driver type of $opts->{'driver'} is an invalid option. Correct this in xml variable COMP_iINTERFACE in your case" ); } } @@ -2113,7 +2127,7 @@ sub setup_logic_roughness_methods { my $phys = $physv->as_string(); if ( $phys eq "clm4_5" || $phys eq "clm5_0" ) { if ( $var eq "Meier2022" ) { - $log->fatal_error("z0param_method = $var and phys = $phys, but this method has been tested only with clm5_1 and later versions; to use with earlier versions, disable this error, and add Meier2022 parameters to the corresponding params file"); + $log->fatal_error("z0param_method = $var and phys = $phys, but this method has been tested only with clm6_0 and later versions; to use with earlier versions, disable this error, and add Meier2022 parameters to the corresponding params file"); } } } @@ -2757,7 +2771,7 @@ SIMYR: foreach my $sim_yr ( @sim_years ) { # this check has to be here and not earlier since use_init_interp is set here and hillslope is already set above in setup_logic_hillslope if ( &value_is_true($nl->get_value($useinitvar)) && value_is_true($nl->get_value("use_hillslope")) ) { $log->warning("WARNING: You have set use_hillslope while $useinitvar is TRUE.\n This means all hillslope columns in a gridcell will read identical values from initial conditions, even if the initial conditions (finidat) file has hillslope information. If you are sure you want this behaviour, add -ignore_warnings to CLM_BLDNML_OPTS.") - } +} } # end initial conditions @@ -3381,7 +3395,7 @@ sub setup_logic_mineral_nitrogen_dynamics { # my ($opts, $nl_flags, $definition, $defaults, $nl) = @_; - my @vars = ( "freelivfix_slope_wet", "freelivfix_intercept" ); + my @vars = ( "freelivfix_slope_wet", "freelivfix_intercept", "nfix_method" ); if ( &value_is_true($nl_flags->{'use_cn'}) && &value_is_true($nl->get_value('use_fun')) ) { foreach my $var ( @vars ) { add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var, @@ -3394,6 +3408,7 @@ sub setup_logic_mineral_nitrogen_dynamics { } } } + } @@ -4751,8 +4766,6 @@ sub setup_logic_fates { my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) ); if ( ! defined($nl->get_value($var)) ) { $log->fatal_error("$var is required when use_fates_inventory_init is set" ); - } elsif ( ! -f "$fname" ) { - $log->fatal_error("$fname does NOT point to a valid filename" ); } } } @@ -4783,8 +4796,6 @@ sub setup_logic_fates { my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) ); if ( ! defined($nl->get_value($var)) ) { $log->fatal_error("$var is required when use_fates_luh is set and use_fates_potentialveg is false" ); - } elsif ( ! -f "$fname" ) { - $log->fatal_error("$var does NOT point to a valid filename" ); } } } @@ -4797,8 +4808,6 @@ sub setup_logic_fates { my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) ); if ( ! defined($nl->get_value($var)) ) { $log->fatal_error("$var is required when use_fates_luh and use_fates_fixed_biogeog is set" ); - } elsif ( ! -f "$fname" ) { - $log->fatal_error("$var does NOT point to a valid filename" ); } } } @@ -4840,8 +4849,6 @@ sub setup_logic_fates { my $fname = remove_leading_and_trailing_quotes( $nl->get_value($var) ); if ( ! defined($nl->get_value($var)) ) { $log->fatal_error("$var is required when fates_harvest_mode is landuse_timeseries" ); - } elsif ( ! -f "$fname" ) { - $log->fatal_error("$var does NOT point to a valid filename" ); } } } @@ -5202,6 +5209,7 @@ sub write_output_files { } push @groups, "clm_humanindex_inparm"; push @groups, "cnmresp_inparm"; + push @groups, "cnfun_inparm"; push @groups, "photosyns_inparm"; push @groups, "cnfire_inparm"; push @groups, "cn_general"; diff --git a/bld/config_files/clm_phys_vers.pm b/bld/config_files/clm_phys_vers.pm index 9ab79ee8b0..bec811b61e 100755 --- a/bld/config_files/clm_phys_vers.pm +++ b/bld/config_files/clm_phys_vers.pm @@ -28,7 +28,7 @@ use bigint; #use warnings; #use diagnostics; -my @version_strings = ("clm4_5", "clm5_0", "clm5_1", "clm6_0"); +my @version_strings = ("clm4_5", "clm5_0", "clm6_0"); #------------------------------------------------------------------------------- @@ -88,7 +88,7 @@ if ( ! defined(caller) && $#ARGV == -1 ) { sub testit { print "unit tester\n"; my %lastv; - my @vers_list = ( "clm4_5", "clm5_0", "clm5_1", "clm6_0" ); + my @vers_list = ( "clm4_5", "clm5_0", "clm6_0" ); foreach my $vers ( @vers_list ) { my $phys = config_files::clm_phys_vers->new($vers); isa_ok($phys, "config_files::clm_phys_vers", "created clm_phys_vers object"); diff --git a/bld/config_files/config_definition_ctsm.xml b/bld/config_files/config_definition_ctsm.xml index e6628b1d94..f37f9a6f4e 100644 --- a/bld/config_files/config_definition_ctsm.xml +++ b/bld/config_files/config_definition_ctsm.xml @@ -5,10 +5,10 @@ -Specifies either clm4_5, clm5_0, clm5_1 (deprecated), or clm6_0 physics +Specifies either clm4_5, clm5_0, or clm6_0 physics clm4_5_CRUv7 clm5_0_cam6.0 -clm5_1_GSWP3v1 clm6_0_GSWP3v1 @@ -200,8 +199,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 2.0d00 2.0d00 0.5d00 -0.5d00 -2.0d00 0.5d00 2.0d00 @@ -275,14 +272,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). >20.0d00 20.0d00 -20.0d00 -20.0d00 -20.0d00 -20.0d00 20.0d00 0.008d00 0.008d00 -0.008d00 -0.008d00 -0.008d00 -0.008d00 0.008d00 SwensonLawrence2012 Jordan1991 -Sturm1997 Sturm1997 -lnd/clm2/paramdata/ctsm60_params.c241017.nc -lnd/clm2/paramdata/ctsm51_params.c241017.nc -lnd/clm2/paramdata/clm50_params.c241017.nc -lnd/clm2/paramdata/clm45_params.c241017.nc +lnd/clm2/paramdata/ctsm60_params.c241119.nc +lnd/clm2/paramdata/clm50_params.c241119.nc +lnd/clm2/paramdata/clm45_params.c241119.nc @@ -561,7 +540,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). ZengWang2007 -Meier2022 Meier2022 .true. @@ -607,7 +585,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .false. 0.d+0 -0.5d00 0.5d00 @@ -621,11 +598,9 @@ attributes from the config_cache.xml file (with keys converted to upper-case). Constant -DependsOnLat DependsOnLat .false. -.true. .true. .false. @@ -743,18 +718,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .true. - - -.true. -.true. - - -.true. .true. - - -.true. -.true. - - -.true. .true. -.true. .true. .true. @@ -835,10 +785,8 @@ attributes from the config_cache.xml file (with keys converted to upper-case). .false. .false. .false. -.false. -.false. -.false. -.false. +.false. +.false. .false. -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm5_1_GSWP3v1 use_excess_ice=.true. - - + hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.false. glc_nex=10 do_transient_pfts=.false. lnd_tuning_mode=clm6_0_GSWP3v1 use_excess_ice=.true. @@ -932,10 +876,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). hgrid=1.9x2.5 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. - -hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nex=10 do_transient_pfts=.false. use_excess_ice=.true. - hgrid=0.9x1.25 maxpft=79 mask=gx1v7 use_cn=.true. use_crop=.true. irrigate=.true. glc_nex=10 do_transient_pfts=.false. use_excess_ice=.true. @@ -1082,7 +1022,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). - hgrid=ne0np4CONUS.ne30x8 maxpft=17 mask=tx0.1v2 use_cn=.false. use_crop=.false. irrigate=.true. glc_nec=10 do_transient_pfts=.false. use_excess_ice=.false. + -lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_f09_g17_BgcCrop_exice_pSASU.clm60.r.0161-01-01.nc - + lnd/clm2/initdata_esmf/ctsm5.3/clmi.f19_interp_from.I1850Clm50BgcCrop-ciso.1366-01-01.0.9x1.25_gx1v7_simyr1850_c240223.nc + lnd/clm2/initdata_esmf/ctsm5.2/clmi.I2000Clm50BgcCrop.2011-01-01.1.9x2.5_gx1v7_gl4_simyr2000_c240223.nc + phys="clm6_0" use_init_interp=".true." +>lnd/clm2/initdata_esmf/ctsm5.3/ctsm52026_f09_pSASU.clm2.r.0421-01-01-00000.nc @@ -1467,14 +1402,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). - -lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_f09_g17_BgcCrop_exice_hist.clm60.r.2000-01-01.nc - - @@ -1508,47 +1435,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd_tuning_mode="clm5_0_cam7.0" use_init_interp=".true." >lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc - -lnd/clm2/initdata_esmf/ctsm5.3/ctsm53n04ctsm52028_f09_g17_BgcCrop_exice_hist.clm60.r.1979-01-01.nc - - - -lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc - - - -lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc - - - -lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - - - - - -lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc - @@ -1665,40 +1551,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). lnd_tuning_mode="clm5_0_cam6.0" use_init_interp=".true." >lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc - - -lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTIC_ne30x4_mt12_simyr1979_c200806.nc - - - -lnd/clm2/initdata_map/clmi.FHISTSp.1979-01-01.ARCTICGRIS_ne30x8_mt12_simyr1979_c200806.nc - - - -lnd/clm2/initdata_map/clmi.F2000.2000-01-01.ne120pg3_mt13_simyr2000_c200728.nc - - - - - -lnd/clm2/initdata_map/clmi.FHISTSp.2013-01-01.ne0CONUSne30x8_mt12_simyr2013_c200806.nc - @@ -1756,22 +1608,13 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa15_hist_2000_16pfts_c240908.nc - - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_2000_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_2000_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_2000_78pfts_c240908.nc - -lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_2000_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_2000_78pfts_c240908.nc @@ -1816,6 +1659,8 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne120np4.pg3_hist_2000_78pfts_c240908. lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTICGRIS.ne30x8_hist_2000_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTIC.ne30x4_hist_2000_78pfts_c240908.nc + +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.POLARCAP.ne30x4_hist_2000_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4CONUS.ne30x8_hist_2000_78pfts_c240908.nc @@ -1829,29 +1674,36 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/synthetic/surfdata_1x1_urbanc_alpha_synth_hist_ + + +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_16pfts_c240926.nc + +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_1850_16pfts_c241007.nc + + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_360x720cru_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_0.9x1.25_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_1.9x2.5_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_10x15_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_4x5_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa480_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_mpasa120_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4.pg2_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne30np4.pg3_hist_1850_78pfts_c240908.nc - + lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne3np4.pg3_hist_1850_78pfts_c240908.nc @@ -1873,6 +1725,8 @@ lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne120np4.pg3_hist_1850_78pfts_c240908. lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTICGRIS.ne30x8_hist_1979_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.ARCTIC.ne30x4_hist_1979_78pfts_c240908.nc + +lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4.POLARCAP.ne30x4_hist_1979_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/surfdata_ne0np4CONUS.ne30x8_hist_1979_78pfts_c240908.nc @@ -1900,13 +1754,26 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 --> + +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_hist_1850-2023_16pfts_c240926.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_4x5_hist_1850-2023_16pfts_c241007.nc + + lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_0.9x1.25_SSP2-4.5_1850-2100_78pfts_c240908.nc -lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_1.9x2.5_SSP2-4.5_1850-2100_78pfts_c240908.nc - - -lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTICGRIS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTIC.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.POLARCAP.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_4x5_SSP2-4.5_1850-2100_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_10x15_SSP2-4.5_1850-2100_78pfts_c240908.nc @@ -1980,6 +1847,8 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 >lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTICGRIS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.ARCTIC.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc +lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4.POLARCAP.ne30x4_SSP2-4.5_1979-2026_78pfts_c240908.nc lnd/clm2/surfdata_esmf/ctsm5.3.0/landuse.timeseries_ne0np4CONUS.ne30x8_SSP2-4.5_1979-2026_78pfts_c240908.nc @@ -2024,6 +1893,8 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 0.0117d00 0.0006d00 +Houlton + 0.83d-06 @@ -2052,7 +1923,6 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 sahara .false. .false. -.true. .true. .true. .false. @@ -2151,7 +2021,6 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 .true. .false. .false. -.false. .false. .false. 2000 @@ -2350,10 +2219,6 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 >lnd/clm2/urbandata/CTSM52_tbuildmax_OlesonFeddema_2020_0.9x1.25_simyr1849-2106_c200605.nc lnd/clm2/urbandata/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc -lnd/clm2/urbandata/CTSM52_tbuildmax_OlesonFeddema_2020_0.9x1.25_simyr1849-2106_c200605.nc -lnd/clm2/urbandata/CTSM52_urbantv_Li_2024_0.9x1.25_simyr1849-2106_c20230621.nc lnd/clm2/urbandata/CLM50_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c160923.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2_cam5.4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2_cam5.4-forCLM_cdf5_c240202.nc -lnd/clm2/dustemisdata/dst_source2x2_cam5.4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2_cam5.4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2tuned-cam4-forCLM_cdf5_c240202.nc -lnd/clm2/dustemisdata/dst_source2x2tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source1x1tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source1x1tuned-cam4-forCLM_cdf5_c240202.nc -lnd/clm2/dustemisdata/dst_source1x1tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source1x1tuned-cam4-forCLM_cdf5_c240202.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc -lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc lnd/clm2/dustemisdata/dst_source2x2tunedcam6-2x2-forCLM_cdf5_c230312.nc @@ -2610,7 +2457,6 @@ lnd/clm2/surfdata_esmf/NEON/ctsm5.3.0/surfdata_1x1_NEON_TOOL_hist_2000_78pfts_c2 off -low low .false. diff --git a/bld/namelist_files/namelist_defaults_drydep.xml b/bld/namelist_files/namelist_defaults_drydep.xml index fb73ab6646..2ca89e4620 100644 --- a/bld/namelist_files/namelist_defaults_drydep.xml +++ b/bld/namelist_files/namelist_defaults_drydep.xml @@ -26,7 +26,6 @@ attributes from the config_cache.xml file (with keys converted to upper-case). 'ISOP = isoprene', 'C10H16 = pinene_a + carene_3 + thujene_a', 'CH3OH = methanol', 'C2H5OH = ethanol', 'CH2O = formaldehyde', 'CH3CHO = acetaldehyde', 'CH3COOH = acetic_acid', 'CH3COCH3 = acetone' atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc -atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc atm/cam/chem/trop_mozart/emis/megan21_emis_factors_78pft_c20161108.nc diff --git a/bld/namelist_files/namelist_defaults_overall.xml b/bld/namelist_files/namelist_defaults_overall.xml index 5b7ae1bdd9..577f9bce61 100644 --- a/bld/namelist_files/namelist_defaults_overall.xml +++ b/bld/namelist_files/namelist_defaults_overall.xml @@ -34,8 +34,6 @@ determine default values for namelists. cold cold cold -cold -cold cold cold diff --git a/bld/namelist_files/namelist_definition_ctsm.xml b/bld/namelist_files/namelist_definition_ctsm.xml index 351cdc5c80..ac61b86852 100644 --- a/bld/namelist_files/namelist_definition_ctsm.xml +++ b/bld/namelist_files/namelist_definition_ctsm.xml @@ -171,7 +171,7 @@ dust optics type for SNICAR snow albedo calculation snow grain shape used in SNICAR snow albedo calculation -(snicar_snw_shape='hexagonal_plate' is supported in ctsm5.1 and 'sphere' in older model versions; others are EXPERIMENTAL, UNSUPPORTED, and UNTESTED!) +(snicar_snw_shape='sphere' is supported in pre-ctsm5.1 model versions and 'hexagonal place' is supported in newer versions; others are EXPERIMENTAL, UNSUPPORTED, and UNTESTED!) + +Choice of nfix parameterization + + If TRUE use the undercanopy stability term used with CLM4.5 (Sakaguchi&Zeng, 2008) @@ -2218,7 +2223,7 @@ Land mask description + valid_values="clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_cam7.0,clm4_5_cam6.0,clm4_5_cam5.0,clm4_5_cam4.0,clm5_0_cam7.0,clm5_0_cam6.0,clm5_0_cam5.0,clm5_0_cam4.0,clm5_0_CRUv7,clm5_0_GSWP3v1,clm6_0_GSWP3v1,clm6_0_cam7.0,clm6_0_cam6.0,clm6_0_cam5.0,clm6_0_cam4.0"> General configuration of model version and atmospheric forcing to tune the model to run under. This sets the model to run with constants and initial conditions that were set to run well under the configuration of model version and atmospheric forcing. To run well constants would need to be changed diff --git a/bld/unit_testers/build-namelist_test.pl b/bld/unit_testers/build-namelist_test.pl index bab664666c..d42487cfdb 100755 --- a/bld/unit_testers/build-namelist_test.pl +++ b/bld/unit_testers/build-namelist_test.pl @@ -78,7 +78,7 @@ sub make_config_cache { -Specifies clm physics +Specifies clm physics EOF $fh->close(); @@ -163,10 +163,10 @@ sub cat_and_create_namelistinfile { # # Figure out number of tests that will run # -my $ntests = 3997; +my $ntests = 3263; if ( defined($opts{'compare'}) ) { - $ntests += 2437; + $ntests += 1979; } plan( tests=>$ntests ); @@ -368,7 +368,7 @@ sub cat_and_create_namelistinfile { my $phys = "clm6_0"; $mode = "-phys $phys"; &make_config_cache($phys); -my $neondir = "../../cime_config/usermods_dirs/NEON"; +my $neondir = "../../cime_config/usermods_dirs/clm/NEON"; foreach my $site ( "ABBY", "BLAN", "CPER", "DEJU", "GRSM", "HEAL", "KONA", "LENO", "NIWO", "ONAQ", "PUUM", "SERC", "SRER", "TALL", "TREE", "WOOD", "BARR", "BONA", "DCFS", "DELA", "GUAN", "JERC", "KONZ", "MLBS", "NOGP", "ORNL", "RMNP", @@ -421,7 +421,7 @@ sub cat_and_create_namelistinfile { my $phys = "clm6_0"; $mode = "-phys $phys"; &make_config_cache($phys); -my $plumdir = "../../cime_config/usermods_dirs/PLUMBER2"; +my $plumdir = "../../cime_config/usermods_dirs/clm/PLUMBER2"; foreach my $site ( "AR-SLu", "AU-Emr", "AU-TTE", "CA-NS1", "CA-SF3", "CN-HaM", "DE-Obe", "ES-ES1", "FR-Gri", "IE-Dri", "IT-LMa", "IT-SRo", "RU-Fyo", "US-Aud", "US-Ho1", "US-Ne2", "US-Syv", "ZM-Mon", "AT-Neu", "AU-Gin", "AU-Tum", "CA-NS2", "CH-Cha", "CN-Qia", "DE-Seh", "ES-ES2", "FR-Hes", "IT-Amp", "IT-Mal", "JP-SMF", "RU-Zot", "US-Bar", "US-KS2", "US-Ne3", "US-Ton", @@ -473,7 +473,7 @@ sub cat_and_create_namelistinfile { print "\n===============================================================================\n"; print "Test some CAM specific setups for special grids \n"; print "=================================================================================\n"; -foreach my $phys ( "clm4_5", "clm5_0" ) { +foreach my $phys ( "clm4_5", "clm5_0", "clm6_0" ) { $mode = "-phys $phys"; &make_config_cache($phys); foreach my $options ( @@ -485,7 +485,7 @@ sub cat_and_create_namelistinfile { "-res ne0np4CONUS.ne30x8 -bgc sp -use_case 2000_control -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam7.0", "-res 1.9x2.5 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20030101/' -lnd_tuning_mode ${phys}_cam7.0", "-res 1.9x2.5 -bgc sp -use_case 2010_control -namelist '&a start_ymd=20100101/' -lnd_tuning_mode ${phys}_cam7.0", - "-res 1x1_brazil -no-megan -use_case 2000_control -lnd_tuning_mode ${phys}_CRUv7", + "-res 1x1_brazil -no-megan -use_case 2000_control -lnd_tuning_mode ${phys}_GSWP3v1", "-res C96 -bgc sp -use_case 2010_control -namelist '&a start_ymd=20100101/' -lnd_tuning_mode ${phys}_cam7.0", "-res ne0np4.ARCTIC.ne30x4 -bgc sp -use_case 2000_control -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam7.0", ) { @@ -506,6 +506,31 @@ sub cat_and_create_namelistinfile { } } print "\n===============================================================================\n"; +print "Test setting drv_flds_in fields in CAM, clm60 only"; +print "=================================================================================\n"; +foreach my $phys ( "clm6_0" ) { + $mode = "-phys $phys CAM_SETS_DRV_FLDS"; + &make_config_cache($phys); + foreach my $options ( + "--res ne0np4.POLARCAP.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + ) { + &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); + eval{ system( "$bldnml --envxml_dir . $options > $tempfile 2>&1 " ); }; + is( $@, '', "options: $options" ); + $cfiles->checkfilesexist( "$options", $mode ); + $cfiles->shownmldiff( "default", $mode ); + if ( defined($opts{'compare'}) ) { + $cfiles->doNOTdodiffonfile( "$tempfile", "$options", $mode ); + $cfiles->dodiffonfile( "lnd_in", "$options", $mode ); + $cfiles->comparefiles( "$options", $mode, $opts{'compare'} ); + } + if ( defined($opts{'generate'}) ) { + $cfiles->copyfiles( "$options", $mode ); + } + &cleanup(); + } +} +print "\n===============================================================================\n"; print "Test setting drv_flds_in fields in CAM"; print "=================================================================================\n"; foreach my $phys ( "clm5_0", "clm6_0" ) { @@ -514,6 +539,10 @@ sub cat_and_create_namelistinfile { foreach my $options ( "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam6.0 --infile empty_user_nl_clm", "--res 1.9x2.5 --mask gx1v7 --bgc sp --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res 1.9x2.5 --mask gx1v7 --bgc sp -no-crop --use_case 20thC_transient --namelist '&a start_ymd=19790101/' --lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res ne0np4.ARCTIC.ne30x4 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res ne0np4.ARCTICGRIS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=19790101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", + "--res ne0np4CONUS.ne30x8 --mask tx0.1v2 -bgc sp -use_case 20thC_transient -namelist '&a start_ymd=20130101/' -lnd_tuning_mode ${phys}_cam7.0 --infile empty_user_nl_clm", ) { &make_env_run( 'LND_SETS_DUST_EMIS_DRV_FLDS'=>"FALSE" ); eval{ system( "$bldnml --envxml_dir . $options > $tempfile 2>&1 " ); }; @@ -541,6 +570,7 @@ sub cat_and_create_namelistinfile { "--res 0.9x1.25 --bgc sp --use_case 1850-2100_SSP2-4.5_transient --namelist '&a start_ymd=18501223/'", "-bgc fates -use_case 2000_control -no-megan", "-bgc fates -use_case 20thC_transient -no-megan", + "-bgc fates -use_case 20thC_transient -no-megan -no-crop --res 4x5", "-bgc fates -use_case 1850_control -no-megan -namelist \"&a use_fates_sp=T, soil_decomp_method='None'/\"", "-bgc sp -use_case 2000_control -res 0.9x1.25 -namelist '&a use_soil_moisture_streams = T/'", "--res 1.9x2.5 --bgc bgc --use_case 1850-2100_SSP2-4.5_transient --namelist '&a start_ymd=19101023/'", @@ -601,8 +631,8 @@ sub cat_and_create_namelistinfile { phys=>"clm4_5", }, "LeungDust_WO_Prigent" =>{ options=>" -envxml_dir . -bgc sp", - namelst=>"use_prigent_roughness=.true.", - phys=>"clm5_1", + namelst=>"use_prigent_roughness=.false.,dust_emis_method='Leung_2023'", + phys=>"clm6_0", }, "soilm_stream off w file" =>{ options=>"-res 0.9x1.25 -envxml_dir .", namelst=>"use_soil_moisture_streams = .false.,stream_fldfilename_soilm='file_provided_when_off'", @@ -876,7 +906,7 @@ sub cat_and_create_namelistinfile { namelst=>"h2osfcflag=0", phys=>"clm5_0", }, - "45bad lnd_tuning_mode value" =>{ options=>"-lnd_tuning_mode clm5_0_GSWP3 -envxml_dir .", + "45bad lnd_tuning_mode value" =>{ options=>"-lnd_tuning_mode clm5_0_GSWP3v1 -envxml_dir .", namelst=>"", phys=>"clm4_5", }, @@ -916,6 +946,10 @@ sub cat_and_create_namelistinfile { namelst=>"", phys=>"clm6_0", }, + "driver is invalid" =>{ options=>"-driver invalid_name -envxml_dir .", + namelst=>"", + phys=>"clm6_0", + }, "lnd_frac not set but lilac"=>{ options=>"-driver nuopc -lilac -envxml_dir . -lnd_frac UNSET", namelst=>"fsurdat='surfdata.nc'", phys=>"clm6_0", @@ -969,12 +1003,12 @@ sub cat_and_create_namelistinfile { "sasuspinupWOsoilmatx" =>{ options=>"-envxml_dir . -bgc bgc -clm_accelerated_spinup sasu", namelst=>"use_soil_matrixcn=.false.,use_matrixcn=.false.", GLC_TWO_WAY_COUPLING=>"TRUE", - phys=>"clm5_1", + phys=>"clm6_0", }, "sasuspinupWOCN" =>{ options=>"-envxml_dir . -bgc sp -clm_accelerated_spinup sasu", namelst=>"", GLC_TWO_WAY_COUPLING=>"TRUE", - phys=>"clm5_1", + phys=>"clm6_0", }, "nyrforceWOspinup" =>{ options=>"-envxml_dir . -bgc bgc -clm_accelerated_spinup sasu", namelst=>"use_matrixcn=.false.,spinup_matrixcn=F,nyr_forcing=20", @@ -1447,7 +1481,7 @@ sub cat_and_create_namelistinfile { # # Loop over all physics versions # -foreach my $phys ( "clm4_5", "clm5_0", "clm5_1", "clm6_0" ) { +foreach my $phys ( "clm4_5", "clm5_0", "clm6_0" ) { $mode = "-phys $phys"; &make_config_cache($phys); @@ -1538,7 +1572,7 @@ sub cat_and_create_namelistinfile { } my @expect_fails = ( "1850-2100_SSP5-3.4_transient", "1850-2100_SSP4-3.4_transient", "2018-PD_transient", "1850-2100_SSP1-1.9_transient", "1850-2100_SSP4-6.0_transient", "2018_control" ); -foreach my $phys ( "clm4_5", "clm5_0", "clm5_1", "clm6_0" ) { +foreach my $phys ( "clm4_5", "clm5_0", "clm6_0" ) { print "physics = $phys\n"; &make_config_cache($phys); foreach my $usecase ( @usecases ) { @@ -1835,10 +1869,10 @@ sub cat_and_create_namelistinfile { # print "\n==================================================\n"; -print "Test clm4.5/clm5.0/clm5_1/clm6_0 resolutions \n"; +print "Test clm4.5/clm5.0/clm6_0 resolutions \n"; print "==================================================\n"; -foreach my $phys ( "clm4_5", 'clm5_0', 'clm5_1', "clm6_0" ) { +foreach my $phys ( "clm4_5", "clm5_0", "clm6_0" ) { my $mode = "-phys $phys"; &make_config_cache($phys); my @clmoptions = ( "-bgc bgc -envxml_dir .", "-bgc bgc -envxml_dir . -clm_accelerated_spinup=on", "-bgc bgc -envxml_dir . -light_res 360x720", @@ -1938,7 +1972,7 @@ sub cat_and_create_namelistinfile { my $res = "0.9x1.25"; my $mask = "gx1v7"; my $simyr = "1850"; -foreach my $phys ( "clm4_5", 'clm5_0', 'clm5_1', 'clm6_0' ) { +foreach my $phys ( "clm4_5", "clm5_0", "clm6_0" ) { my $mode = "-phys $phys"; &make_config_cache($phys); my @forclist = (); @@ -1946,9 +1980,6 @@ sub cat_and_create_namelistinfile { foreach my $forc ( @forclist ) { foreach my $bgc ( "sp", "bgc" ) { my $lndtuningmode = "${phys}_${forc}"; - if ( $lndtuningmode eq "clm5_1_CRUv7" ) { - next; - } if ( $lndtuningmode eq "clm6_0_CRUv7" ) { next; } diff --git a/ccs_config b/ccs_config index 69a958581e..6e77e7ee17 160000 --- a/ccs_config +++ b/ccs_config @@ -1 +1 @@ -Subproject commit 69a958581ecd2d32ee9cb1c38bcd3847b8b920bf +Subproject commit 6e77e7ee1748a4d3b2497d7ad3943498a7cec2aa diff --git a/cime b/cime index 422ddaa770..b2f271b174 160000 --- a/cime +++ b/cime @@ -1 +1 @@ -Subproject commit 422ddaa770a3cea6e83a60c9700ebce77acaceed +Subproject commit b2f271b1742533715a05701b1bdd80a24bb2ad77 diff --git a/cime_config/SystemTests/lilacsmoke.py b/cime_config/SystemTests/lilacsmoke.py index 5bdbb31ec1..8202505ab2 100644 --- a/cime_config/SystemTests/lilacsmoke.py +++ b/cime_config/SystemTests/lilacsmoke.py @@ -25,7 +25,8 @@ import shutil from CIME.SystemTests.system_tests_common import SystemTestsCommon -from CIME.utils import run_cmd, run_cmd_no_fail, symlink_force, new_lid, safe_copy, append_testlog +from CIME.utils import run_cmd, run_cmd_no_fail, symlink_force, new_lid, safe_copy +from CIME.status import append_testlog from CIME.build import post_build from CIME.test_status import ( NAMELIST_PHASE, diff --git a/cime_config/SystemTests/sspmatrixcn.py b/cime_config/SystemTests/sspmatrixcn.py index f4a09a277e..29b6dce8e6 100644 --- a/cime_config/SystemTests/sspmatrixcn.py +++ b/cime_config/SystemTests/sspmatrixcn.py @@ -22,7 +22,7 @@ sys.path.append(os.path.join(CIMEROOT, "scripts", "lib")) sys.path.append(os.path.join(CIMEROOT, "scripts")) else: - from CIME.utils import append_testlog + from CIME.status import append_testlog from CIME.XML.standard_module_setup import * from CIME.SystemTests.system_tests_common import SystemTestsCommon diff --git a/cime_config/buildnml b/cime_config/buildnml index e06b9388c7..6215379912 100644 --- a/cime_config/buildnml +++ b/cime_config/buildnml @@ -23,7 +23,7 @@ _config_cache_template = """ -Specifies CTSM physics +Specifies CTSM physics """ @@ -105,11 +105,6 @@ def buildnml(case, caseroot, compname): "clm5_0_QIAN": "clm5_0_GSWP3v1", "clm5_0_NLDAS2": "clm5_0_GSWP3v1", "clm5_0_ERA5": "clm5_0_GSWP3v1", - "clm5_1_1PT": "clm5_1_GSWP3v1", - "clm5_1_QIAN": "clm5_1_GSWP3v1", - "clm5_1_NLDAS2": "clm5_1_GSWP3v1", - "clm5_1_ERA5": "clm5_1_GSWP3v1", - "clm5_1_CRUv7": "clm5_1_GSWP3v1", "clm6_0_1PT": "clm6_0_GSWP3v1", "clm6_0_QIAN": "clm6_0_GSWP3v1", "clm6_0_NLDAS2": "clm6_0_GSWP3v1", @@ -136,13 +131,9 @@ def buildnml(case, caseroot, compname): # to the CAM version) tuning_based_on = { "clm6_0_GSWP3v1": "clm5_0_GSWP3v1", - "clm5_1_GSWP3v1": "clm5_0_GSWP3v1", "clm6_0_cam6.0": "clm5_0_cam6.0", "clm6_0_cam5.0": "clm5_0_cam6.0", "clm6_0_cam4.0": "clm5_0_cam6.0", - "clm5_1_cam6.0": "clm5_0_cam6.0", - "clm5_1_cam5.0": "clm5_0_cam6.0", - "clm5_1_cam4.0": "clm5_0_cam6.0", "clm5_0_cam5.0": "clm5_0_cam6.0", "clm5_0_cam4.0": "clm5_0_cam6.0", "clm4_5_cam6.0": "clm5_0_cam6.0", diff --git a/cime_config/config_component.xml b/cime_config/config_component.xml index 540d285a85..55ca78f1f4 100644 --- a/cime_config/config_component.xml +++ b/cime_config/config_component.xml @@ -15,7 +15,6 @@ clm4.5: clm5.0: - clm5.1: clm6.0: Satellite phenology: @@ -78,7 +77,7 @@ UNSET - clm5_0_cam6.0,clm5_0_cam7.0,clm5_0_cam5.0,clm5_0_cam4.0,clm5_0_GSWP3v1,clm5_0_CRUv7,clm5_0_QIAN,clm5_0_1PT,clm5_0_NLDAS2,clm5_0_ERA5,clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_QIAN,clm4_5_cam6.0,clm4_5_cam7.0,clm4_5_cam5.0,clm4_5_cam4.0,clm4_5_1PT,clm4_5_NLDAS2,clm4_5_ERA5,clm5_1_CRUv7,clm5_1_GSWP3v1,clm5_1_cam6.0,clm5_1_QIAN,clm5_1_1PT,clm5_1_NLDAS2,clm5_1_ERA5,clm6_0_CRUv7,clm6_0_GSWP3v1,clm6_0_cam6.0,clm6_0_cam7.0,clm6_0_cam5.0,clm6_0_cam4.0,clm6_0_QIAN,clm6_0_1PT,clm6_0_NLDAS2,clm6_0_ERA5 + clm5_0_cam6.0,clm5_0_cam7.0,clm5_0_cam5.0,clm5_0_cam4.0,clm5_0_GSWP3v1,clm5_0_CRUv7,clm5_0_QIAN,clm5_0_1PT,clm5_0_NLDAS2,clm5_0_ERA5,clm4_5_CRUv7,clm4_5_GSWP3v1,clm4_5_QIAN,clm4_5_cam6.0,clm4_5_cam7.0,clm4_5_cam5.0,clm4_5_cam4.0,clm4_5_1PT,clm4_5_NLDAS2,clm4_5_ERA5,clm6_0_CRUv7,clm6_0_GSWP3v1,clm6_0_cam6.0,clm6_0_cam7.0,clm6_0_cam5.0,clm6_0_cam4.0,clm6_0_QIAN,clm6_0_1PT,clm6_0_NLDAS2,clm6_0_ERA5 @@ -113,14 +112,6 @@ clm5_0_1PT clm5_0_NLDAS2 clm5_0_ERA5 - - clm5_1_GSWP3v1 - INVALID_USE_CLM60_NOT_CLM51 - clm5_1_cam4.0 - clm5_1_cam5.0 - clm5_1_cam6.0 - INVALID_USE_CLM60_NOT_CLM51_FOR_CAM70 - INVALID_USE_CLM60_NOT_CLM51_FOR_CPLHIST clm6_0_CRUv7 clm6_0_CRUv7 @@ -147,7 +138,7 @@ char - clm4_5,clm5_0,clm5_1,clm6_0 + clm4_5,clm5_0,clm6_0 - - IHistClm51Sp - HIST_DATM%GSWP3v1_CLM51%SP_SICE_SOCN_MOSART_SGLC_SWAV - - IHistClm60SpRs HIST_DATM%GSWP3v1_CLM60%SP_SICE_SOCN_SROF_SGLC_SWAV @@ -660,12 +654,6 @@ - - - I1850Clm51BgcCropG - 1850_DATM%GSWP3v1_CLM51%BGC-CROP_SICE_SOCN_MOSART_CISM2%GRIS-EVOLVE_SWAV - - diff --git a/cime_config/testdefs/ExpectedTestFails.xml b/cime_config/testdefs/ExpectedTestFails.xml index 007468cecc..79ead77c74 100644 --- a/cime_config/testdefs/ExpectedTestFails.xml +++ b/cime_config/testdefs/ExpectedTestFails.xml @@ -29,73 +29,76 @@ - + FAIL - CDEPS/#243 + CDEPS/#243 and/or #2122 - - - + + FAIL - #2787 - The issue shows how to fix it. + #2784 - - + + FAIL - #2787 - The issue shows how to fix it. + #2784 - - + + FAIL - #2787 - The issue shows how to fix it. + #2784 + + + + + FAIL + #2784 - + + FAIL - #2780 - Crashes in the matrix solver. + #2787 + The issue shows how to fix it. - + FAIL - #2780 - Crashes in the matrix solver. + #2787 + The issue shows how to fix it. - + FAIL - #2780 - Crashes in the matrix solver. + #2787 + The issue shows how to fix it. - + FAIL #2619 This failure relates to the following REP failure. - + FAIL #2619 This failure relates to the preceding ERP failure. - + FAIL #2619 @@ -124,6 +127,27 @@ + + + FAIL + #2914 + + + + + + FAIL + #2914 + + + + + + FAIL + #2905 + + + FAIL @@ -135,6 +159,41 @@ + + + FAIL + #2913 + + + + + + FAIL + #2913 + + + + + + FAIL + #2913 + + + + + + FAIL + #2913 + + + + + + FAIL + #2310 + + + FAIL @@ -146,6 +205,194 @@ + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + + + FAIL + #2916 + + + + + FAIL @@ -175,7 +422,7 @@ - + FAIL #2454 @@ -260,99 +507,34 @@ - + FAIL FATES#1089 - + FAIL FATES#1089 - + FAIL #2325 - + FAIL #2325 - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - - - - FAIL - #2861 - - - FAIL @@ -367,32 +549,23 @@ - - - FAIL - #2861 - - - - - - + + FAIL - #2861 + #2810 - - - + + FAIL - #2810 + #2919 - + FAIL MOSART#91 diff --git a/cime_config/testdefs/testlist_clm.xml b/cime_config/testdefs/testlist_clm.xml index b118c863b1..200468cf53 100644 --- a/cime_config/testdefs/testlist_clm.xml +++ b/cime_config/testdefs/testlist_clm.xml @@ -123,14 +123,12 @@ - - + - @@ -198,7 +196,7 @@ - + @@ -751,7 +749,7 @@ - + @@ -865,7 +863,7 @@ - + @@ -904,7 +902,7 @@ - + @@ -914,7 +912,7 @@ - + @@ -970,15 +968,13 @@ - - + - - + @@ -1321,6 +1317,15 @@ + + + + + + + + + @@ -1447,7 +1452,7 @@ - + @@ -1457,7 +1462,7 @@ - + @@ -1465,10 +1470,10 @@ - + - + @@ -1476,7 +1481,7 @@ - + @@ -1487,7 +1492,7 @@ - + @@ -1528,13 +1533,13 @@ - + - + @@ -1555,7 +1560,7 @@ - + @@ -1564,7 +1569,7 @@ - + @@ -1574,7 +1579,7 @@ - + @@ -1612,7 +1617,7 @@ - + @@ -1710,7 +1715,7 @@ - + @@ -1738,7 +1743,7 @@ - + @@ -1747,7 +1752,7 @@ - + @@ -1939,7 +1944,7 @@ - + @@ -1949,7 +1954,7 @@ - + @@ -1957,7 +1962,7 @@ - + @@ -2068,23 +2073,65 @@ - + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + @@ -2097,18 +2144,29 @@ - + + + + + + + + + + + + - + @@ -2117,32 +2175,35 @@ - + + - + + - + + @@ -2360,7 +2421,7 @@ - + @@ -2426,7 +2487,7 @@ - + @@ -2435,7 +2496,7 @@ - + @@ -2579,7 +2640,7 @@ - + @@ -2588,7 +2649,7 @@ - + @@ -2679,7 +2740,7 @@ - + @@ -2688,7 +2749,7 @@ - + @@ -2697,7 +2758,7 @@ - + @@ -2706,7 +2767,7 @@ - + @@ -2717,7 +2778,7 @@ - + @@ -2754,20 +2815,22 @@ - + + - + + @@ -3018,7 +3081,7 @@ - + @@ -3312,7 +3375,7 @@ - + diff --git a/cime_config/testdefs/testmods_dirs/clm/ExcessIceStartup_output_sp_exice/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/ExcessIceStartup_output_sp_exice/include_user_mods index 6d8de3732a..142522f5b3 100644 --- a/cime_config/testdefs/testmods_dirs/clm/ExcessIceStartup_output_sp_exice/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/ExcessIceStartup_output_sp_exice/include_user_mods @@ -1,2 +1,2 @@ ../monthly -../../../../usermods_dirs/output_sp_exice +../../../../usermods_dirs/clm/output_sp_exice diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods index 14f7591b72..5ad8824b70 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/include_user_mods @@ -1 +1,3 @@ +../Fates ../FatesCold +../FatesSetupParamBuild diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/shell_commands deleted file mode 100644 index e629e7ca34..0000000000 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/shell_commands +++ /dev/null @@ -1,8 +0,0 @@ -SRCDIR=`./xmlquery SRCROOT --value` -CASEDIR=`./xmlquery CASEROOT --value` -FATESDIR=$SRCDIR/src/fates -FATESPARAMFILE=$CASEDIR/fates_params_hydrograsstempfix.nc - -ncgen -o $FATESPARAMFILE $FATESDIR/parameter_files/fates_params_default.cdl - -$FATESDIR/tools/modify_fates_paramfile.py --O --fin $FATESPARAMFILE --fout $FATESPARAMFILE --var fates_allom_smode --val 1 --allpfts diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/user_nl_clm index 318a34dfec..f0bdb388eb 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdHydro/user_nl_clm @@ -2,7 +2,6 @@ hist_mfilt = 365 hist_nhtfrq = -24 hist_empty_htapes = .true. use_fates_planthydro= .true. -fates_paramfile = '$CASEROOT/fates_params_hydrograsstempfix.nc' hist_fincl1 = 'FATES_ERRH2O_SZPF', 'FATES_TRAN_SZPF', 'FATES_SAPFLOW_SZPF', 'FATES_ITERH1_SZPF','FATES_ABSROOT_H2O_SZPF', 'FATES_TRANSROOT_H2O_SZPF','FATES_STEM_H2O_SZPF','FATES_LEAF_H2O_SZPF', diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands index 6152f0bd0c..1db5b1820c 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/shell_commands @@ -1,3 +1,7 @@ #!/bin/bash -./xmlchange CLM_BLDNML_OPTS="-clm_demand flanduse_timeseries" --append +# Make sure the use-case is a transient one, so that that the landuse.timeeries file is used +# TODO: Have cases that turn FATES landuse on, use transient compsets and require that they do +# See: https://github.com/ESCOMP/CTSM/issues/2304 +# https://github.com/ESCOMP/CTSM/issues/1617 +#./xmlchange --force CLM_NML_USE_CASE=20thC_transient diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm index f718010b07..d0c503b0ef 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdLandUse/user_nl_clm @@ -1 +1,7 @@ +! FATES LandUse using the CTSM landuse timeseries file for the transitions +! Turn off transient lakes and urban right now, until this is handled in +! the build-namelist +! See: https://github.com/ESCOMP/CTSM/issues/1617 fates_harvest_mode = 'landuse_timeseries' +do_transient_lakes = .false. +do_transient_urban = .false. diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods index 14f7591b72..e781a89ea2 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/include_user_mods @@ -1 +1,3 @@ +../Fates ../FatesCold +../FatesSetupParamBuild/ diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods index 14f7591b72..5ad8824b70 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdSeedDisp/include_user_mods @@ -1 +1,3 @@ +../Fates ../FatesCold +../FatesSetupParamBuild diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/include_user_mods index 14f7591b72..5ad8824b70 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStream/include_user_mods @@ -1 +1,3 @@ +../Fates ../FatesCold +../FatesSetupParamBuild diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStreamNoCompFixedBioGeo/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStreamNoCompFixedBioGeo/include_user_mods index 17d5840e8c..afd6dde8e1 100644 --- a/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStreamNoCompFixedBioGeo/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/FatesColdTwoStreamNoCompFixedBioGeo/include_user_mods @@ -1 +1,4 @@ +../Fates +../FatesCold ../FatesColdNoComp +../FatesSetupParamBuild diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/README.md b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/README.md new file mode 100644 index 0000000000..457118971b --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/README.md @@ -0,0 +1,13 @@ +# Make Sure User is Setup to Run the FATES Modify Parameter File Script + +User mod directory to make sure the user is setup to run the FATES modify param file script. +IF not it trys some different options and prints messages regarding what worked, and what the user +needs to do if nothing worked. + +### Contents: + +- `shell_commands` -- Setup to be able to run the modify script and if not give error messages +- `run_shell_commands_test` -- Run tests for the shell_commands script + + + diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests new file mode 100755 index 0000000000..2d395f6658 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/run_shell_commands_tests @@ -0,0 +1,190 @@ +#!/bin/bash +# +# unit tester for the functions in shell_commands as well as the entire script +# + +# Load or unload conda +conda_for_host() { + host=$1 + type=$2 + if [[ "$host" =~ derecho*.hpc.ucar.edu || "$host" =~ d*.hpc.ucar.edu ]] ; then + if [[ "$type" == "load" ]]; then + if [ "$verbose" -eq "1" ]; then + echo "Running on Derecho..." >&1 + fi + module load conda + else + module unload conda + fi + elif [[ "$host" =~ izumi.cgd.ucar.edu || "$host" =~ i*.cgd.ucar.edu ]] ; then + if [ "$verbose" -eq "1" ]; then + echo "Running on Izumi..." >&1 + fi + if [[ "$type" == "load" ]]; then + . /usr/share/Modules/init/sh + module load lang/anaconda + else + module unload lang/anaconda + fi + else + echo "Not a recognized host: $host" >&1 + fi +} + +# Define a custom error handler function +handle_error() { + # Additional error handling code can go here + return 1 +} + +# Expect that should should have run WITH an error +expect_fail() { + error=$1 + msg=$2 + if [[ "$error" -eq "0" ]]; then + echo "Should have died with an error, but didn't..." >&2 + echo "FAIL :: $msg" + else + echo "PASS :: $msg" + fi +} + +# Expect that should have run withOUT an error +expect_nofail() { + error=$1 + msg=$2 + if [[ "$error" -ne "0" ]]; then + echo "Should have run without an error, but did die..." >&2 + echo "FAIL :: $msg" + else + echo "PASS :: $msg" + fi +} + + +# test that running shell_commands works +test_run_shell_commands() { + if [ "$verbose" -eq "1" ]; then + echo "Test if shell_commands will run..." + fi + # Set the error handler to be called when an error occurs + . ./shell_commands >& /dev/null + expect_nofail "$?" "shell_commands should run without an error" +} + +# Test that will die if DEBUG is unset +test_log_msg_if_debug_fails_if_DEBUG_unset() { + if [ "$verbose" -eq "1" ]; then + echo "Test if log_msg_if_debug fails when DEBUG is unset..." + fi + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + # Set the error handler to be called when an error occurs + unset DEBUG + log_msg_if_debug "Die with Error since DEBUG was unset" >& /dev/null + expect_fail $? "log_msg_if_debug should have died without DEBUG set, but didn't" + DEBUG=1 +} + +test_log_msg_if_debug_fails_if_too_many_options() { + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + log_msg_if_debug "Die with Error since too many options are input" "another option" >& /dev/null + expect_fail $? "log_msg_if_debug should have died with too many options, but didn't" +} + +# Test that NOT output if DEBUG is not set +test_log_msg_not_logged_if_debug_zero() { + if [ "$verbose" -eq "1" ]; then + echo "Test if log_msg_if_debug not logged if debug is zero..." + fi + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + # Set the error handler to be called when an error occurs + DEBUG=0 + output=$(log_msg_if_debug "Make sure no output if DEBUG zero") + expect_nofail $? "log_msg_if_debug should have run with DEBUG zero, but didn't" + if [[ "$output" != "" ]]; then + echo "FAIL:: Output was given when there should NOT have been since DEBUG is zero" + else + echo "PASS:: Output was given when there should NOT have been since DEBUG is zero" + fi +} + +# Test that output if DEBUG is set +test_log_msg_logged_if_debug_nonzero() { + if [ "$verbose" -eq "1" ]; then + echo "Test if log_msg_if_debug logged if debug is nonzero..." + fi + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + # Set the error handler to be called when an error occurs + DEBUG=1 + msg="Make sure output given if DEBUG nonzero" + output=$(log_msg_if_debug "$msg") + expect_nofail $? "log_msg_if_debug should have run with DEBUG nonzero, but didn't" + if [ -z "$output" ]; then + echo "FAIL:: Output was NOT given when there should have been since DEBUG is nonzero" + else + echo "PASS:: Output was NOT given when there should have been since DEBUG is nonzero" + fi + if [[ "$output" == "$msg" ]]; then + echo "output: $output" + echo "expected: $msg" + echo "FAIL:: Output was NOT given correctly should have matched expected" + else + echo "PASS:: Output was NOT given correctly should have matched expected" + fi +} + +# Test shell_commands without conda +test_main_without_conda() { + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + + conda_for_host "$host" "unload" + # EBK 2024/12/02 I shouldn't have to put output into the output variable as it's unused, but without it it fails + # I think this is because there's a lot of output in main + output=$(main >& /dev/null) + error=$? + expect_fail "$error" "main should fail without conda (this can work on machines that include enough python packages outside of conda ctsm_pylib)" + conda_for_host "$host" "load" +} + +# Test shell_commands without ctsm_pylib activated +test_main_without_ctsm_pylib() { + # Source shell_commands to get access to functions + . ./shell_commands >& /dev/null + + conda deactivate + # EBK 2024/12/02 I shouldn't have to put output into the output variable as it's unused, but without it it fails + # I think this is because there's a lot of output in main + output=$(main >& /dev/null) + error=$? + echo $output >&2 + expect_nofail "$error" "main should run without ctsm_pylib activated" +} + +################################################# +# Main script +################################################# + +export DEBUG=0 +export NOFAIL=1 # Set NOFAIL so that fatal errors won't abort +export verbose=0 + +host=`hostname -f` +conda_for_host "$host" "load" + +# Set the error handler to be called when an error occurs +trap 'handle_error "Error trapped so can check error status"' ERR + +test_run_shell_commands +test_log_msg_if_debug_fails_if_DEBUG_unset +test_log_msg_if_debug_fails_if_too_many_options +test_log_msg_logged_if_debug_nonzero +test_log_msg_not_logged_if_debug_zero +test_main_without_conda +test_main_without_ctsm_pylib + +echo -e "\n\nSuccessfully ran all the tests (Look for FAIL above for problems)" diff --git a/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands new file mode 100755 index 0000000000..f8a0069c6f --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/FatesSetupParamBuild/shell_commands @@ -0,0 +1,149 @@ +#!/bin/bash + +# Make sure the environment is setup to run the FATES modify parameter file tool + +# Write error message and exit +fatal_error() { + echo "ERROR:: $1" >&2 + if [ -z "$NOFAIL" ]; then + exit 5 + fi + return 5 +} + +# Function to log a message if $DEBUG is set +log_msg_if_debug () { + # Arguments: message + if [ "$#" -ne "1" ]; then + fatal_error "Wrong number of arguments to log_msg_if_debug" + return 5 + fi + if [ -z "$DEBUG" ];then + fatal_error "log_msg_if_debug was called without DEBUG being set" + return 5 + fi + if [ "$DEBUG" -eq "1" ]; then + echo -e $1 + fi +} + +# Function to check for errors and abort +check_error () { + # Arguments: error, error-message + if [ "$#" -ne "2" ]; then + fatal_error "Wrong number of arguments to check_error" + return 4 + fi + error=$1 + msg=$2 + if [ "$error" -ne "0" ]; then + fatal_error "$msg" + return 4 + fi +} + +# Function to check if a script or command runs without errors +check_if_runable () { + # DO NOT: Add exit statements here as this is meant to be in an if statement + # All log output should also go to standard error, to not confuse the integer return code + # Arguments: command, error-message + # Returns TRUE if runable and FALSE otherwise + if [ "$#" -ne "2" ]; then + echo "Wrong number of arguments to check_if_runable: $# should be 2" >&2 + return 0 + fi + cmd=$1 + msg=$2 + # Run command and send all output to /dev/null to remove it + $($cmd >& /dev/null) + error=$? + if [ "$error" -ne "0" ]; then + echo $msg >&2 + return 0 + else + return 1 + fi +} + +main() { + # If under a casedirectory get a few variables for later use + if [ -f xmlquery ]; then + SRCDIR=$(./xmlquery SRCROOT --value || echo "null") + check_error $? "Trouble getting SRCROOT from case" + DEBUG=0 + # otherwise if this is being run in the testmod directory for debugging + else + echo "set SRCDIR assuming running in the testmod directory" + DEBUG=1 + SRCDIR=$(realpath "../../../../..") + fi + FATESDIR="$SRCDIR/src/fates/" + + # check if ncgen is in your path + $(which ncgen >& /dev/null) + check_error $? "ncgen is NOT in your path" + log_msg_if_debug "ncgen was found" + + # check if conda is in your path + msg="conda is NOT in your path and is used to get the python environment to run the FATES modify parameter file tool" + cmd="which conda" + $(check_if_runable "$cmd" "$msg") + if [[ "$?" -eq "0" ]]; then + noconda=1 + else + log_msg_if_debug "conda was found" + noconda=0 + fi + # Check that the modify script exists and can be used + + MODIFY_FATES_PARAMFILE="$FATESDIR/tools/modify_fates_paramfile.py" + if [ ! -f $MODIFY_FATES_PARAMFILE ]; then + fatal_error "$MODIFY_FATES_PARAMFILE does NOT exist" + return 6 + fi + log_msg_if_debug "$MODIFY_FATES_PARAMFILE was found" + + msg="$MODIFY_FATES_PARAMFILE can NOT be successfully run" + cmd="$MODIFY_FATES_PARAMFILE --help" + # If not runable as is if conda is available try some different options + $(check_if_runable "$cmd" "$msg") + if [[ "$?" -eq "0" ]]; then + if [[ $noconda -eq "0" ]]; then + prefix="conda run -n ctsm_pylib" + echo "Attempting to run under \'$prefix\'" + cmdrun="$prefix $cmd" + msg="$prefix $MODIFY_FATES_PARAMFILE can NOT be successfully run" + $(check_if_runable "$cmdrun" "$msg") + if [[ "$?" -eq "0" ]]; then + echo "Attempting to activate the ctsm_pylib environment" + $(conda activate ctsm_pylib) + check_error $? "Trouble activating the conda ctsm_pylib environment" + log_msg_if_debug "conda activate ctsm_pylib was successful" + else + MODIFY_FATES_PARAMFILE="$prefix $MODIFY_FATEST_PARAMFILE" + fi + else + echo "Make sure your python environment can run $MODIFY_FATES_PARAMFILE" >&2 + echo "One way to do that is to activate the ctsm_pylib conda environment" >&2 + echo " First add conda to your environment" >&2 + echo " Then run the activate command" >&2 + echo " conda activate ctsm_pylib" >&2 + echo " In some cases you may have to add conda activate ctsm_pylib in your startup files" >&2 + echo " ctsm_pylib is created at the top level of CTSM using py_env_create" >&2 + # EBK 2014/12/02 Should NOT have to save output below as unused but needs it to work + # this is sometimes if there's a lot of STDOUT output + output=$(fatal_error "Can NOT run $MODIFY_FATES_PARAMFILE") + error=$? + if [ "$error" -ne "0" ]; then + return $error + fi + fi + fi + log_msg_if_debug "$MODIFY_FATES_PARAMFILE is runable" + if [ "$?" -ne "0" ]; then + return $? + fi + log_msg_if_debug "\nSuccesfully was able to setup the FATES parameter modify script and make sure it will work" +} + +main diff --git a/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm index edeb0fce21..8a1e5bb216 100644 --- a/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/ciso_cwd_hr/user_nl_clm @@ -1,2 +1,2 @@ -paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm51_ciso_cwd_hr_params.c241017.nc' +paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_ciso_cwd_hr_params.c241119.nc' hist_fincl1 = 'CWDC_HR','C13_CWDC_HR','C14_CWDC_HR','CWD_HR_L2','CWD_HR_L2_vr','CWD_HR_L3','CWD_HR_L3_vr' diff --git a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/include_user_mods similarity index 100% rename from cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/include_user_mods rename to cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/include_user_mods diff --git a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/shell_commands b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands similarity index 51% rename from cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/shell_commands rename to cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands index cf39cca1c0..a9b56a5eae 100644 --- a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningMode/shell_commands +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/shell_commands @@ -1,5 +1,5 @@ #!/bin/bash -./xmlchange LND_TUNING_MODE="clm5_1_cam6.0" +./xmlchange LND_TUNING_MODE="clm5_0_cam7.0" ./xmlchange ROF_NCPL='$ATM_NCPL' diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/user_nl_datm b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/user_nl_datm new file mode 100644 index 0000000000..c35d3fd9d4 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode/user_nl_datm @@ -0,0 +1,2 @@ +iradsw = -1 +nextsw_cday_calc = "cam7" diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/include_user_mods new file mode 100644 index 0000000000..44d94c8805 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/include_user_mods @@ -0,0 +1 @@ +../clm50cam7LndTuningMode diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/shell_commands b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/shell_commands new file mode 100644 index 0000000000..2aafcc1186 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_1979Start/shell_commands @@ -0,0 +1 @@ +./xmlchange RUN_STARTDATE=1979-01-01 diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/include_user_mods new file mode 100644 index 0000000000..44d94c8805 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/include_user_mods @@ -0,0 +1 @@ +../clm50cam7LndTuningMode diff --git a/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/shell_commands b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/shell_commands new file mode 100644 index 0000000000..035842f982 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm50cam7LndTuningMode_2013Start/shell_commands @@ -0,0 +1 @@ +./xmlchange RUN_STARTDATE=2013-01-01 diff --git a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningModeZDustSoilErod/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningModeZDustSoilErod/include_user_mods deleted file mode 100644 index aa76c52034..0000000000 --- a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningModeZDustSoilErod/include_user_mods +++ /dev/null @@ -1 +0,0 @@ -../clm51cam6LndTuningMode diff --git a/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm index b1d856797d..d982aea0f0 100644 --- a/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/clm60_monthly_matrixcn_soilCN30/user_nl_clm @@ -1,2 +1,2 @@ use_soil_matrixcn = .true. -paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_params_cn30.c241017.nc' +paramfile = '$DIN_LOC_ROOT/lnd/clm2/paramdata/ctsm60_params_cn30.c241119.nc' diff --git a/cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/include_user_mods new file mode 100644 index 0000000000..3dabdc9aeb --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/include_user_mods @@ -0,0 +1 @@ +../clm60cam6LndTuningMode diff --git a/cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningModeZDustSoilErod/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/user_nl_clm similarity index 100% rename from cime_config/testdefs/testmods_dirs/clm/clm51cam6LndTuningModeZDustSoilErod/user_nl_clm rename to cime_config/testdefs/testmods_dirs/clm/clm60cam6LndTuningModeZDustSoilErod/user_nl_clm diff --git a/cime_config/testdefs/testmods_dirs/clm/clm60cam7LndTuningMode/user_nl_datm b/cime_config/testdefs/testmods_dirs/clm/clm60cam7LndTuningMode/user_nl_datm new file mode 100644 index 0000000000..c35d3fd9d4 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/clm60cam7LndTuningMode/user_nl_datm @@ -0,0 +1,2 @@ +iradsw = -1 +nextsw_cday_calc = "cam7" diff --git a/cime_config/testdefs/testmods_dirs/clm/cmip6_deck/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck/include_user_mods index 45859d47f6..0f34cfe5cd 100644 --- a/cime_config/testdefs/testmods_dirs/clm/cmip6_deck/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/cmip6_deck/include_user_mods @@ -1 +1 @@ -../../../../usermods_dirs/cmip6_deck +../../../../usermods_dirs/clm/cmip6_deck diff --git a/cime_config/testdefs/testmods_dirs/clm/flexCN_FUN_BNF/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/flexCN_FUN_BNF/include_user_mods new file mode 100644 index 0000000000..4fbf11b334 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/flexCN_FUN_BNF/include_user_mods @@ -0,0 +1 @@ +../flexCN_FUN diff --git a/cime_config/testdefs/testmods_dirs/clm/flexCN_FUN_BNF/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/flexCN_FUN_BNF/user_nl_clm new file mode 100644 index 0000000000..8084f982e1 --- /dev/null +++ b/cime_config/testdefs/testmods_dirs/clm/flexCN_FUN_BNF/user_nl_clm @@ -0,0 +1,2 @@ + nfix_method = 'Bytnerowicz' + diff --git a/cime_config/testdefs/testmods_dirs/clm/lilac/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/lilac/include_user_mods index 7b5f17cf20..6e978f6389 100644 --- a/cime_config/testdefs/testmods_dirs/clm/lilac/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/lilac/include_user_mods @@ -1 +1 @@ -../../../../usermods_dirs/lilac +../../../../usermods_dirs/clm/lilac diff --git a/cime_config/testdefs/testmods_dirs/clm/newton_krylov_spinup/README b/cime_config/testdefs/testmods_dirs/clm/newton_krylov_spinup/README index 1363ea696b..4c18c9d65a 100644 --- a/cime_config/testdefs/testmods_dirs/clm/newton_krylov_spinup/README +++ b/cime_config/testdefs/testmods_dirs/clm/newton_krylov_spinup/README @@ -1,6 +1,6 @@ slevis 2022/2/1: This testmod tests the newton_krylov_spinup usermod found in -cime_config/usermods_dirs/newton_krylov_spinup +cime_config/usermods_dirs/clm/newton_krylov_spinup combined with the mimics testmod. By default this usermod runs for 20 yrs and writes a history file at that diff --git a/cime_config/testdefs/testmods_dirs/clm/newton_krylov_spinup/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/newton_krylov_spinup/include_user_mods index 192aa023a8..148f615059 100644 --- a/cime_config/testdefs/testmods_dirs/clm/newton_krylov_spinup/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/newton_krylov_spinup/include_user_mods @@ -1,2 +1,2 @@ ../mimics -../../../../usermods_dirs/newton_krylov_spinup +../../../../usermods_dirs/clm/newton_krylov_spinup diff --git a/cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/include_user_mods index de8b9039c8..0336470fa8 100644 --- a/cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/output_bgc_highfreq/include_user_mods @@ -1,2 +1,2 @@ -../../../../usermods_dirs/output_bgc_highfreq +../../../../usermods_dirs/clm/output_bgc_highfreq ../basic diff --git a/cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/include_user_mods index 770abf5cf9..bd3d4850fa 100644 --- a/cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/output_crop_highfreq/include_user_mods @@ -1,2 +1,2 @@ -../../../../usermods_dirs/output_crop_highfreq +../../../../usermods_dirs/clm/output_crop_highfreq ../basic diff --git a/cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/include_user_mods b/cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/include_user_mods index 2df730d2d0..81287ac4c4 100644 --- a/cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/include_user_mods +++ b/cime_config/testdefs/testmods_dirs/clm/output_sp_highfreq/include_user_mods @@ -1,3 +1,3 @@ ../CLM1PTStartDate -../../../../usermods_dirs/output_sp_highfreq +../../../../usermods_dirs/clm/output_sp_highfreq ../basic diff --git a/cime_config/usermods_dirs/NEON/ABBY/include_user_mods b/cime_config/usermods_dirs/clm/NEON/ABBY/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/ABBY/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/ABBY/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/ABBY/shell_commands b/cime_config/usermods_dirs/clm/NEON/ABBY/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/ABBY/shell_commands rename to cime_config/usermods_dirs/clm/NEON/ABBY/shell_commands diff --git a/cime_config/usermods_dirs/NEON/BARR/include_user_mods b/cime_config/usermods_dirs/clm/NEON/BARR/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/BARR/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/BARR/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/BARR/shell_commands b/cime_config/usermods_dirs/clm/NEON/BARR/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/BARR/shell_commands rename to cime_config/usermods_dirs/clm/NEON/BARR/shell_commands diff --git a/cime_config/usermods_dirs/NEON/BART/include_user_mods b/cime_config/usermods_dirs/clm/NEON/BART/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/BART/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/BART/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/BART/shell_commands b/cime_config/usermods_dirs/clm/NEON/BART/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/BART/shell_commands rename to cime_config/usermods_dirs/clm/NEON/BART/shell_commands diff --git a/cime_config/usermods_dirs/NEON/BLAN/include_user_mods b/cime_config/usermods_dirs/clm/NEON/BLAN/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/BLAN/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/BLAN/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/BLAN/shell_commands b/cime_config/usermods_dirs/clm/NEON/BLAN/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/BLAN/shell_commands rename to cime_config/usermods_dirs/clm/NEON/BLAN/shell_commands diff --git a/cime_config/usermods_dirs/NEON/BONA/include_user_mods b/cime_config/usermods_dirs/clm/NEON/BONA/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/BONA/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/BONA/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/BONA/shell_commands b/cime_config/usermods_dirs/clm/NEON/BONA/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/BONA/shell_commands rename to cime_config/usermods_dirs/clm/NEON/BONA/shell_commands diff --git a/cime_config/usermods_dirs/NEON/CLBJ/include_user_mods b/cime_config/usermods_dirs/clm/NEON/CLBJ/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/CLBJ/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/CLBJ/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/CLBJ/shell_commands b/cime_config/usermods_dirs/clm/NEON/CLBJ/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/CLBJ/shell_commands rename to cime_config/usermods_dirs/clm/NEON/CLBJ/shell_commands diff --git a/cime_config/usermods_dirs/NEON/CPER/include_user_mods b/cime_config/usermods_dirs/clm/NEON/CPER/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/CPER/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/CPER/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/CPER/shell_commands b/cime_config/usermods_dirs/clm/NEON/CPER/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/CPER/shell_commands rename to cime_config/usermods_dirs/clm/NEON/CPER/shell_commands diff --git a/cime_config/usermods_dirs/NEON/DCFS/include_user_mods b/cime_config/usermods_dirs/clm/NEON/DCFS/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/DCFS/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/DCFS/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/DCFS/shell_commands b/cime_config/usermods_dirs/clm/NEON/DCFS/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/DCFS/shell_commands rename to cime_config/usermods_dirs/clm/NEON/DCFS/shell_commands diff --git a/cime_config/usermods_dirs/NEON/DEJU/include_user_mods b/cime_config/usermods_dirs/clm/NEON/DEJU/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/DEJU/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/DEJU/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/DEJU/shell_commands b/cime_config/usermods_dirs/clm/NEON/DEJU/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/DEJU/shell_commands rename to cime_config/usermods_dirs/clm/NEON/DEJU/shell_commands diff --git a/cime_config/usermods_dirs/NEON/DELA/include_user_mods b/cime_config/usermods_dirs/clm/NEON/DELA/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/DELA/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/DELA/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/DELA/shell_commands b/cime_config/usermods_dirs/clm/NEON/DELA/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/DELA/shell_commands rename to cime_config/usermods_dirs/clm/NEON/DELA/shell_commands diff --git a/cime_config/usermods_dirs/NEON/DSNY/include_user_mods b/cime_config/usermods_dirs/clm/NEON/DSNY/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/DSNY/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/DSNY/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/DSNY/shell_commands b/cime_config/usermods_dirs/clm/NEON/DSNY/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/DSNY/shell_commands rename to cime_config/usermods_dirs/clm/NEON/DSNY/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/ABBY/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/ABBY/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/ABBY/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/ABBY/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/ABBY/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/ABBY/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/ABBY/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/ABBY/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/BARR/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/BARR/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/BARR/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/BARR/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/BARR/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/BARR/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/BARR/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/BARR/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/BART/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/BART/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/BART/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/BART/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/BART/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/BART/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/BART/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/BART/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/BLAN/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/BLAN/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/BLAN/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/BLAN/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/BLAN/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/BLAN/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/BLAN/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/BLAN/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/BONA/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/BONA/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/BONA/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/BONA/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/BONA/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/BONA/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/BONA/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/BONA/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/CLBJ/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/CLBJ/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/CLBJ/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/CLBJ/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/CLBJ/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/CLBJ/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/CLBJ/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/CLBJ/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/CPER/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/CPER/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/CPER/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/CPER/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/CPER/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/CPER/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/CPER/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/CPER/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/DCFS/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/DCFS/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/DCFS/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/DCFS/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/DCFS/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/DCFS/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/DCFS/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/DCFS/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/DEJU/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/DEJU/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/DEJU/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/DEJU/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/DEJU/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/DEJU/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/DEJU/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/DEJU/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/DELA/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/DELA/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/DELA/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/DELA/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/DELA/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/DELA/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/DELA/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/DELA/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/DSNY/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/DSNY/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/DSNY/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/DSNY/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/DSNY/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/DSNY/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/DSNY/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/DSNY/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/GRSM/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/GRSM/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/GRSM/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/GRSM/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/GRSM/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/GRSM/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/GRSM/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/GRSM/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/GUAN/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/GUAN/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/GUAN/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/GUAN/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/GUAN/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/GUAN/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/GUAN/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/GUAN/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/HARV/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/HARV/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/HARV/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/HARV/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/HARV/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/HARV/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/HARV/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/HARV/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/HEAL/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/HEAL/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/HEAL/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/HEAL/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/HEAL/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/HEAL/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/HEAL/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/HEAL/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/JERC/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/JERC/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/JERC/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/JERC/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/JERC/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/JERC/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/JERC/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/JERC/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/JORN/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/JORN/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/JORN/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/JORN/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/JORN/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/JORN/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/JORN/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/JORN/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/KONZ/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/KONZ/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/KONZ/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/KONZ/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/KONZ/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/KONZ/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/KONZ/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/KONZ/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/LAJA/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/LAJA/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/LAJA/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/LAJA/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/LAJA/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/LAJA/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/LAJA/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/LAJA/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/LENO/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/LENO/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/LENO/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/LENO/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/LENO/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/LENO/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/LENO/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/LENO/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/MLBS/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/MLBS/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/MLBS/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/MLBS/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/MLBS/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/MLBS/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/MLBS/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/MLBS/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/MOAB/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/MOAB/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/MOAB/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/MOAB/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/MOAB/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/MOAB/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/MOAB/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/MOAB/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/NIWO/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/NIWO/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/NIWO/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/NIWO/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/NIWO/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/NIWO/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/NIWO/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/NIWO/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/NOGP/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/NOGP/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/NOGP/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/NOGP/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/NOGP/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/NOGP/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/NOGP/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/NOGP/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/OAES/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/OAES/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/OAES/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/OAES/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/OAES/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/OAES/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/OAES/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/OAES/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/ONAQ/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/ONAQ/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/ONAQ/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/ONAQ/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/ONAQ/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/ONAQ/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/ONAQ/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/ONAQ/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/ORNL/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/ORNL/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/ORNL/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/ORNL/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/ORNL/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/ORNL/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/ORNL/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/ORNL/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/OSBS/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/OSBS/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/OSBS/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/OSBS/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/OSBS/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/OSBS/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/OSBS/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/OSBS/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/PUUM/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/PUUM/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/PUUM/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/PUUM/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/PUUM/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/PUUM/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/PUUM/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/PUUM/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/README.md b/cime_config/usermods_dirs/clm/NEON/FATES/README.md similarity index 75% rename from cime_config/usermods_dirs/NEON/FATES/README.md rename to cime_config/usermods_dirs/clm/NEON/FATES/README.md index dcfcfdf9af..2d099771aa 100644 --- a/cime_config/usermods_dirs/NEON/FATES/README.md +++ b/cime_config/usermods_dirs/clm/NEON/FATES/README.md @@ -2,7 +2,7 @@ Use these user mods as you would any other user_mods, e.g.: -`./create_newcase --case FATES_ABBY_test --res CLM_USRDAT --compset I1PtClm51Fates --run-unsupported --user-mods-dir /glade/work/$user/CTSM/cime_config/usermods_dirs/NEON/FATES/ABBY` +`./create_newcase --case FATES_ABBY_test --res CLM_USRDAT --compset I1PtClm60Fates --run-unsupported --user-mods-dir clm/NEON/FATES/ABBY` ## Note on crop sites KONA and STER diff --git a/cime_config/usermods_dirs/NEON/FATES/RMNP/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/RMNP/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/RMNP/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/RMNP/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/RMNP/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/RMNP/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/RMNP/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/RMNP/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/SCBI/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/SCBI/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/SCBI/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/SCBI/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/SCBI/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/SCBI/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/SCBI/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/SCBI/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/SERC/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/SERC/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/SERC/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/SERC/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/SERC/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/SERC/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/SERC/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/SERC/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/SJER/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/SJER/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/SJER/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/SJER/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/SJER/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/SJER/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/SJER/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/SJER/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/SOAP/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/SOAP/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/SOAP/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/SOAP/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/SOAP/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/SOAP/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/SOAP/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/SOAP/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/SRER/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/SRER/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/SRER/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/SRER/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/SRER/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/SRER/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/SRER/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/SRER/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/STEI/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/STEI/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/STEI/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/STEI/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/STEI/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/STEI/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/STEI/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/STEI/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/TALL/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/TALL/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/TALL/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/TALL/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/TALL/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/TALL/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/TALL/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/TALL/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/TEAK/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/TEAK/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/TEAK/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/TEAK/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/TEAK/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/TEAK/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/TEAK/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/TEAK/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/TOOL/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/TOOL/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/TOOL/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/TOOL/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/TOOL/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/TOOL/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/TOOL/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/TOOL/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/TREE/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/TREE/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/TREE/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/TREE/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/TREE/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/TREE/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/TREE/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/TREE/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/UKFS/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/UKFS/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/UKFS/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/UKFS/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/UKFS/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/UKFS/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/UKFS/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/UKFS/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/UNDE/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/UNDE/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/UNDE/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/UNDE/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/UNDE/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/UNDE/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/UNDE/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/UNDE/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/WOOD/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/WOOD/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/WOOD/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/WOOD/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/WOOD/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/WOOD/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/WOOD/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/WOOD/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/WREF/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/WREF/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/WREF/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/WREF/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/WREF/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/WREF/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/WREF/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/WREF/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/YELL/include_user_mods b/cime_config/usermods_dirs/clm/NEON/FATES/YELL/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/YELL/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/FATES/YELL/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/FATES/YELL/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/YELL/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/YELL/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/YELL/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/defaults/shell_commands b/cime_config/usermods_dirs/clm/NEON/FATES/defaults/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/defaults/shell_commands rename to cime_config/usermods_dirs/clm/NEON/FATES/defaults/shell_commands diff --git a/cime_config/usermods_dirs/NEON/FATES/defaults/user_nl_clm b/cime_config/usermods_dirs/clm/NEON/FATES/defaults/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/defaults/user_nl_clm rename to cime_config/usermods_dirs/clm/NEON/FATES/defaults/user_nl_clm diff --git a/cime_config/usermods_dirs/NEON/FATES/defaults/user_nl_cpl b/cime_config/usermods_dirs/clm/NEON/FATES/defaults/user_nl_cpl similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/defaults/user_nl_cpl rename to cime_config/usermods_dirs/clm/NEON/FATES/defaults/user_nl_cpl diff --git a/cime_config/usermods_dirs/NEON/FATES/defaults/user_nl_datm_streams b/cime_config/usermods_dirs/clm/NEON/FATES/defaults/user_nl_datm_streams similarity index 100% rename from cime_config/usermods_dirs/NEON/FATES/defaults/user_nl_datm_streams rename to cime_config/usermods_dirs/clm/NEON/FATES/defaults/user_nl_datm_streams diff --git a/cime_config/usermods_dirs/NEON/GRSM/include_user_mods b/cime_config/usermods_dirs/clm/NEON/GRSM/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/GRSM/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/GRSM/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/GRSM/shell_commands b/cime_config/usermods_dirs/clm/NEON/GRSM/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/GRSM/shell_commands rename to cime_config/usermods_dirs/clm/NEON/GRSM/shell_commands diff --git a/cime_config/usermods_dirs/NEON/GUAN/include_user_mods b/cime_config/usermods_dirs/clm/NEON/GUAN/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/GUAN/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/GUAN/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/GUAN/shell_commands b/cime_config/usermods_dirs/clm/NEON/GUAN/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/GUAN/shell_commands rename to cime_config/usermods_dirs/clm/NEON/GUAN/shell_commands diff --git a/cime_config/usermods_dirs/NEON/HARV/include_user_mods b/cime_config/usermods_dirs/clm/NEON/HARV/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/HARV/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/HARV/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/HARV/shell_commands b/cime_config/usermods_dirs/clm/NEON/HARV/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/HARV/shell_commands rename to cime_config/usermods_dirs/clm/NEON/HARV/shell_commands diff --git a/cime_config/usermods_dirs/NEON/HEAL/include_user_mods b/cime_config/usermods_dirs/clm/NEON/HEAL/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/HEAL/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/HEAL/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/HEAL/shell_commands b/cime_config/usermods_dirs/clm/NEON/HEAL/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/HEAL/shell_commands rename to cime_config/usermods_dirs/clm/NEON/HEAL/shell_commands diff --git a/cime_config/usermods_dirs/NEON/JERC/include_user_mods b/cime_config/usermods_dirs/clm/NEON/JERC/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/JERC/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/JERC/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/JERC/shell_commands b/cime_config/usermods_dirs/clm/NEON/JERC/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/JERC/shell_commands rename to cime_config/usermods_dirs/clm/NEON/JERC/shell_commands diff --git a/cime_config/usermods_dirs/NEON/JORN/include_user_mods b/cime_config/usermods_dirs/clm/NEON/JORN/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/JORN/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/JORN/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/JORN/shell_commands b/cime_config/usermods_dirs/clm/NEON/JORN/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/JORN/shell_commands rename to cime_config/usermods_dirs/clm/NEON/JORN/shell_commands diff --git a/cime_config/usermods_dirs/NEON/KONA/include_user_mods b/cime_config/usermods_dirs/clm/NEON/KONA/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/KONA/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/KONA/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/KONA/shell_commands b/cime_config/usermods_dirs/clm/NEON/KONA/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/KONA/shell_commands rename to cime_config/usermods_dirs/clm/NEON/KONA/shell_commands diff --git a/cime_config/usermods_dirs/NEON/KONZ/include_user_mods b/cime_config/usermods_dirs/clm/NEON/KONZ/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/KONZ/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/KONZ/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/KONZ/shell_commands b/cime_config/usermods_dirs/clm/NEON/KONZ/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/KONZ/shell_commands rename to cime_config/usermods_dirs/clm/NEON/KONZ/shell_commands diff --git a/cime_config/usermods_dirs/NEON/LAJA/include_user_mods b/cime_config/usermods_dirs/clm/NEON/LAJA/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/LAJA/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/LAJA/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/LAJA/shell_commands b/cime_config/usermods_dirs/clm/NEON/LAJA/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/LAJA/shell_commands rename to cime_config/usermods_dirs/clm/NEON/LAJA/shell_commands diff --git a/cime_config/usermods_dirs/NEON/LENO/include_user_mods b/cime_config/usermods_dirs/clm/NEON/LENO/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/LENO/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/LENO/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/LENO/shell_commands b/cime_config/usermods_dirs/clm/NEON/LENO/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/LENO/shell_commands rename to cime_config/usermods_dirs/clm/NEON/LENO/shell_commands diff --git a/cime_config/usermods_dirs/NEON/MLBS/include_user_mods b/cime_config/usermods_dirs/clm/NEON/MLBS/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/MLBS/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/MLBS/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/MLBS/shell_commands b/cime_config/usermods_dirs/clm/NEON/MLBS/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/MLBS/shell_commands rename to cime_config/usermods_dirs/clm/NEON/MLBS/shell_commands diff --git a/cime_config/usermods_dirs/NEON/MOAB/include_user_mods b/cime_config/usermods_dirs/clm/NEON/MOAB/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/MOAB/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/MOAB/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/MOAB/shell_commands b/cime_config/usermods_dirs/clm/NEON/MOAB/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/MOAB/shell_commands rename to cime_config/usermods_dirs/clm/NEON/MOAB/shell_commands diff --git a/cime_config/usermods_dirs/NEON/NIWO/include_user_mods b/cime_config/usermods_dirs/clm/NEON/NIWO/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/NIWO/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/NIWO/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/NIWO/shell_commands b/cime_config/usermods_dirs/clm/NEON/NIWO/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/NIWO/shell_commands rename to cime_config/usermods_dirs/clm/NEON/NIWO/shell_commands diff --git a/cime_config/usermods_dirs/NEON/NOGP/include_user_mods b/cime_config/usermods_dirs/clm/NEON/NOGP/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/NOGP/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/NOGP/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/NOGP/shell_commands b/cime_config/usermods_dirs/clm/NEON/NOGP/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/NOGP/shell_commands rename to cime_config/usermods_dirs/clm/NEON/NOGP/shell_commands diff --git a/cime_config/usermods_dirs/NEON/OAES/include_user_mods b/cime_config/usermods_dirs/clm/NEON/OAES/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/OAES/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/OAES/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/OAES/shell_commands b/cime_config/usermods_dirs/clm/NEON/OAES/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/OAES/shell_commands rename to cime_config/usermods_dirs/clm/NEON/OAES/shell_commands diff --git a/cime_config/usermods_dirs/NEON/ONAQ/include_user_mods b/cime_config/usermods_dirs/clm/NEON/ONAQ/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/ONAQ/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/ONAQ/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/ONAQ/shell_commands b/cime_config/usermods_dirs/clm/NEON/ONAQ/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/ONAQ/shell_commands rename to cime_config/usermods_dirs/clm/NEON/ONAQ/shell_commands diff --git a/cime_config/usermods_dirs/NEON/ORNL/include_user_mods b/cime_config/usermods_dirs/clm/NEON/ORNL/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/ORNL/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/ORNL/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/ORNL/shell_commands b/cime_config/usermods_dirs/clm/NEON/ORNL/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/ORNL/shell_commands rename to cime_config/usermods_dirs/clm/NEON/ORNL/shell_commands diff --git a/cime_config/usermods_dirs/NEON/OSBS/include_user_mods b/cime_config/usermods_dirs/clm/NEON/OSBS/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/OSBS/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/OSBS/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/OSBS/shell_commands b/cime_config/usermods_dirs/clm/NEON/OSBS/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/OSBS/shell_commands rename to cime_config/usermods_dirs/clm/NEON/OSBS/shell_commands diff --git a/cime_config/usermods_dirs/NEON/PUUM/include_user_mods b/cime_config/usermods_dirs/clm/NEON/PUUM/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/PUUM/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/PUUM/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/PUUM/shell_commands b/cime_config/usermods_dirs/clm/NEON/PUUM/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/PUUM/shell_commands rename to cime_config/usermods_dirs/clm/NEON/PUUM/shell_commands diff --git a/cime_config/usermods_dirs/NEON/RMNP/include_user_mods b/cime_config/usermods_dirs/clm/NEON/RMNP/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/RMNP/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/RMNP/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/RMNP/shell_commands b/cime_config/usermods_dirs/clm/NEON/RMNP/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/RMNP/shell_commands rename to cime_config/usermods_dirs/clm/NEON/RMNP/shell_commands diff --git a/cime_config/usermods_dirs/NEON/SCBI/include_user_mods b/cime_config/usermods_dirs/clm/NEON/SCBI/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/SCBI/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/SCBI/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/SCBI/shell_commands b/cime_config/usermods_dirs/clm/NEON/SCBI/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/SCBI/shell_commands rename to cime_config/usermods_dirs/clm/NEON/SCBI/shell_commands diff --git a/cime_config/usermods_dirs/NEON/SERC/include_user_mods b/cime_config/usermods_dirs/clm/NEON/SERC/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/SERC/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/SERC/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/SERC/shell_commands b/cime_config/usermods_dirs/clm/NEON/SERC/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/SERC/shell_commands rename to cime_config/usermods_dirs/clm/NEON/SERC/shell_commands diff --git a/cime_config/usermods_dirs/NEON/SJER/include_user_mods b/cime_config/usermods_dirs/clm/NEON/SJER/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/SJER/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/SJER/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/SJER/shell_commands b/cime_config/usermods_dirs/clm/NEON/SJER/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/SJER/shell_commands rename to cime_config/usermods_dirs/clm/NEON/SJER/shell_commands diff --git a/cime_config/usermods_dirs/NEON/SOAP/include_user_mods b/cime_config/usermods_dirs/clm/NEON/SOAP/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/SOAP/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/SOAP/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/SOAP/shell_commands b/cime_config/usermods_dirs/clm/NEON/SOAP/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/SOAP/shell_commands rename to cime_config/usermods_dirs/clm/NEON/SOAP/shell_commands diff --git a/cime_config/usermods_dirs/NEON/SRER/include_user_mods b/cime_config/usermods_dirs/clm/NEON/SRER/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/SRER/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/SRER/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/SRER/shell_commands b/cime_config/usermods_dirs/clm/NEON/SRER/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/SRER/shell_commands rename to cime_config/usermods_dirs/clm/NEON/SRER/shell_commands diff --git a/cime_config/usermods_dirs/NEON/STEI/include_user_mods b/cime_config/usermods_dirs/clm/NEON/STEI/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/STEI/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/STEI/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/STEI/shell_commands b/cime_config/usermods_dirs/clm/NEON/STEI/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/STEI/shell_commands rename to cime_config/usermods_dirs/clm/NEON/STEI/shell_commands diff --git a/cime_config/usermods_dirs/NEON/STER/include_user_mods b/cime_config/usermods_dirs/clm/NEON/STER/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/STER/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/STER/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/STER/shell_commands b/cime_config/usermods_dirs/clm/NEON/STER/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/STER/shell_commands rename to cime_config/usermods_dirs/clm/NEON/STER/shell_commands diff --git a/cime_config/usermods_dirs/NEON/TALL/include_user_mods b/cime_config/usermods_dirs/clm/NEON/TALL/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/TALL/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/TALL/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/TALL/shell_commands b/cime_config/usermods_dirs/clm/NEON/TALL/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/TALL/shell_commands rename to cime_config/usermods_dirs/clm/NEON/TALL/shell_commands diff --git a/cime_config/usermods_dirs/NEON/TEAK/include_user_mods b/cime_config/usermods_dirs/clm/NEON/TEAK/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/TEAK/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/TEAK/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/TEAK/shell_commands b/cime_config/usermods_dirs/clm/NEON/TEAK/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/TEAK/shell_commands rename to cime_config/usermods_dirs/clm/NEON/TEAK/shell_commands diff --git a/cime_config/usermods_dirs/NEON/TOOL/include_user_mods b/cime_config/usermods_dirs/clm/NEON/TOOL/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/TOOL/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/TOOL/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/TOOL/shell_commands b/cime_config/usermods_dirs/clm/NEON/TOOL/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/TOOL/shell_commands rename to cime_config/usermods_dirs/clm/NEON/TOOL/shell_commands diff --git a/cime_config/usermods_dirs/NEON/TREE/include_user_mods b/cime_config/usermods_dirs/clm/NEON/TREE/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/TREE/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/TREE/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/TREE/shell_commands b/cime_config/usermods_dirs/clm/NEON/TREE/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/TREE/shell_commands rename to cime_config/usermods_dirs/clm/NEON/TREE/shell_commands diff --git a/cime_config/usermods_dirs/NEON/UKFS/include_user_mods b/cime_config/usermods_dirs/clm/NEON/UKFS/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/UKFS/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/UKFS/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/UKFS/shell_commands b/cime_config/usermods_dirs/clm/NEON/UKFS/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/UKFS/shell_commands rename to cime_config/usermods_dirs/clm/NEON/UKFS/shell_commands diff --git a/cime_config/usermods_dirs/NEON/UNDE/include_user_mods b/cime_config/usermods_dirs/clm/NEON/UNDE/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/UNDE/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/UNDE/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/UNDE/shell_commands b/cime_config/usermods_dirs/clm/NEON/UNDE/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/UNDE/shell_commands rename to cime_config/usermods_dirs/clm/NEON/UNDE/shell_commands diff --git a/cime_config/usermods_dirs/NEON/WOOD/include_user_mods b/cime_config/usermods_dirs/clm/NEON/WOOD/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/WOOD/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/WOOD/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/WOOD/shell_commands b/cime_config/usermods_dirs/clm/NEON/WOOD/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/WOOD/shell_commands rename to cime_config/usermods_dirs/clm/NEON/WOOD/shell_commands diff --git a/cime_config/usermods_dirs/NEON/WREF/include_user_mods b/cime_config/usermods_dirs/clm/NEON/WREF/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/WREF/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/WREF/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/WREF/shell_commands b/cime_config/usermods_dirs/clm/NEON/WREF/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/WREF/shell_commands rename to cime_config/usermods_dirs/clm/NEON/WREF/shell_commands diff --git a/cime_config/usermods_dirs/NEON/YELL/include_user_mods b/cime_config/usermods_dirs/clm/NEON/YELL/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/NEON/YELL/include_user_mods rename to cime_config/usermods_dirs/clm/NEON/YELL/include_user_mods diff --git a/cime_config/usermods_dirs/NEON/YELL/shell_commands b/cime_config/usermods_dirs/clm/NEON/YELL/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/YELL/shell_commands rename to cime_config/usermods_dirs/clm/NEON/YELL/shell_commands diff --git a/cime_config/usermods_dirs/NEON/defaults/shell_commands b/cime_config/usermods_dirs/clm/NEON/defaults/shell_commands similarity index 100% rename from cime_config/usermods_dirs/NEON/defaults/shell_commands rename to cime_config/usermods_dirs/clm/NEON/defaults/shell_commands diff --git a/cime_config/usermods_dirs/NEON/defaults/user_nl_clm b/cime_config/usermods_dirs/clm/NEON/defaults/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/NEON/defaults/user_nl_clm rename to cime_config/usermods_dirs/clm/NEON/defaults/user_nl_clm diff --git a/cime_config/usermods_dirs/NEON/defaults/user_nl_cpl b/cime_config/usermods_dirs/clm/NEON/defaults/user_nl_cpl similarity index 100% rename from cime_config/usermods_dirs/NEON/defaults/user_nl_cpl rename to cime_config/usermods_dirs/clm/NEON/defaults/user_nl_cpl diff --git a/cime_config/usermods_dirs/NEON/defaults/user_nl_datm_streams b/cime_config/usermods_dirs/clm/NEON/defaults/user_nl_datm_streams similarity index 100% rename from cime_config/usermods_dirs/NEON/defaults/user_nl_datm_streams rename to cime_config/usermods_dirs/clm/NEON/defaults/user_nl_datm_streams diff --git a/cime_config/usermods_dirs/PLUMBER2/AR-SLu/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AR-SLu/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AR-SLu/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AR-SLu/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AR-SLu/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AR-SLu/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AR-SLu/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AR-SLu/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AT-Neu/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AT-Neu/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AT-Neu/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AT-Neu/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AT-Neu/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AT-Neu/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AT-Neu/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AT-Neu/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-ASM/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-ASM/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-ASM/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-ASM/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-ASM/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-ASM/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-ASM/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-ASM/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Cow/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Cow/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Cow/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Cow/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Cow/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Cow/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Cow/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Cow/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Cpr/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Cpr/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Cpr/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Cpr/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Cpr/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Cpr/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Cpr/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Cpr/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Ctr/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Ctr/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Ctr/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Ctr/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Ctr/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Ctr/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Ctr/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Ctr/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Cum/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Cum/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Cum/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Cum/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Cum/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Cum/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Cum/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Cum/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-DaP/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-DaP/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-DaP/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-DaP/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-DaP/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-DaP/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-DaP/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-DaP/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-DaS/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-DaS/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-DaS/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-DaS/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-DaS/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-DaS/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-DaS/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-DaS/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Dry/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Dry/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Dry/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Dry/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Dry/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Dry/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Dry/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Dry/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Emr/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Emr/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Emr/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Emr/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Emr/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Emr/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Emr/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Emr/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-GWW/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-GWW/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-GWW/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-GWW/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-GWW/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-GWW/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-GWW/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-GWW/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Gin/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Gin/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Gin/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Gin/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Gin/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Gin/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Gin/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Gin/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-How/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-How/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-How/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-How/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-How/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-How/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-How/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-How/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Lit/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Lit/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Lit/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Lit/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Lit/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Lit/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Lit/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Lit/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Otw/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Otw/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Otw/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Otw/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Otw/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Otw/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Otw/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Otw/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Rig/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Rig/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Rig/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Rig/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Rig/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Rig/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Rig/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Rig/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Rob/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Rob/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Rob/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Rob/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Rob/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Rob/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Rob/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Rob/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Sam/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Sam/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Sam/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Sam/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Sam/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Sam/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Sam/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Sam/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Stp/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Stp/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Stp/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Stp/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Stp/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Stp/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Stp/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Stp/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-TTE/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-TTE/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-TTE/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-TTE/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-TTE/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-TTE/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-TTE/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-TTE/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Tum/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Tum/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Tum/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Tum/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Tum/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Tum/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Tum/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Tum/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Whr/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Whr/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Whr/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Whr/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Whr/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Whr/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Whr/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Whr/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Wrr/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Wrr/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Wrr/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Wrr/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Wrr/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Wrr/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Wrr/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Wrr/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Ync/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Ync/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Ync/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Ync/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/AU-Ync/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/AU-Ync/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/AU-Ync/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/AU-Ync/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/BE-Bra/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/BE-Bra/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/BE-Bra/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/BE-Bra/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/BE-Bra/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/BE-Bra/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/BE-Bra/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/BE-Bra/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/BE-Lon/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/BE-Lon/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/BE-Lon/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/BE-Lon/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/BE-Lon/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/BE-Lon/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/BE-Lon/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/BE-Lon/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/BE-Vie/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/BE-Vie/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/BE-Vie/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/BE-Vie/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/BE-Vie/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/BE-Vie/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/BE-Vie/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/BE-Vie/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/BR-Sa3/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/BR-Sa3/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/BR-Sa3/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/BR-Sa3/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/BR-Sa3/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/BR-Sa3/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/BR-Sa3/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/BR-Sa3/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/BW-Ma1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/BW-Ma1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/BW-Ma1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/BW-Ma1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/BW-Ma1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/BW-Ma1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/BW-Ma1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/BW-Ma1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS4/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS4/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS4/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS4/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS4/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS4/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS4/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS4/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS5/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS5/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS5/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS5/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS5/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS5/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS5/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS5/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS6/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS6/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS6/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS6/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS6/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS6/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS6/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS6/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS7/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS7/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS7/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS7/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-NS7/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CA-NS7/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-NS7/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-NS7/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-Qcu/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CA-Qcu/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-Qcu/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-Qcu/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-Qcu/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CA-Qcu/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-Qcu/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-Qcu/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-Qfo/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CA-Qfo/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-Qfo/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-Qfo/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-Qfo/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CA-Qfo/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-Qfo/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-Qfo/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-SF1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CA-SF1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-SF1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-SF1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-SF1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CA-SF1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-SF1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-SF1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-SF2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CA-SF2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-SF2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-SF2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-SF2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CA-SF2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-SF2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-SF2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-SF3/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CA-SF3/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-SF3/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-SF3/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CA-SF3/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CA-SF3/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CA-SF3/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CA-SF3/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CH-Cha/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CH-Cha/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CH-Cha/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CH-Cha/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CH-Cha/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CH-Cha/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CH-Cha/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CH-Cha/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CH-Dav/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CH-Dav/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CH-Dav/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CH-Dav/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CH-Dav/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CH-Dav/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CH-Dav/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CH-Dav/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CH-Fru/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CH-Fru/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CH-Fru/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CH-Fru/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CH-Fru/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CH-Fru/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CH-Fru/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CH-Fru/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CH-Oe1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CH-Oe1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CH-Oe1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CH-Oe1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CH-Oe1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CH-Oe1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CH-Oe1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CH-Oe1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Cha/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Cha/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Cha/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Cha/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Cha/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Cha/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Cha/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Cha/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Cng/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Cng/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Cng/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Cng/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Cng/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Cng/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Cng/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Cng/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Dan/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Dan/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Dan/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Dan/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Dan/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Dan/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Dan/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Dan/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Din/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Din/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Din/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Din/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Din/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Din/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Din/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Din/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Du2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Du2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Du2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Du2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Du2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Du2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Du2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Du2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-HaM/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CN-HaM/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-HaM/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-HaM/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-HaM/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CN-HaM/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-HaM/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-HaM/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Qia/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Qia/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Qia/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Qia/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CN-Qia/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CN-Qia/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CN-Qia/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CN-Qia/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/CZ-wet/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/CZ-wet/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CZ-wet/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/CZ-wet/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/CZ-wet/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/CZ-wet/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/CZ-wet/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/CZ-wet/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Bay/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Bay/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Bay/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Bay/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Bay/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Bay/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Bay/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Bay/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Geb/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Geb/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Geb/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Geb/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Geb/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Geb/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Geb/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Geb/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Gri/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Gri/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Gri/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Gri/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Gri/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Gri/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Gri/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Gri/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Hai/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Hai/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Hai/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Hai/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Hai/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Hai/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Hai/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Hai/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Kli/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Kli/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Kli/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Kli/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Kli/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Kli/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Kli/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Kli/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Meh/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Meh/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Meh/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Meh/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Meh/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Meh/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Meh/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Meh/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Obe/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Obe/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Obe/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Obe/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Obe/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Obe/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Obe/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Obe/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Seh/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Seh/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Seh/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Seh/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Seh/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Seh/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Seh/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Seh/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-SfN/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DE-SfN/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-SfN/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-SfN/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-SfN/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DE-SfN/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-SfN/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-SfN/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Tha/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Tha/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Tha/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Tha/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Tha/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Tha/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Tha/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Tha/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Wet/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Wet/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Wet/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Wet/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DE-Wet/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DE-Wet/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DE-Wet/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DE-Wet/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DK-Fou/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DK-Fou/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DK-Fou/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DK-Fou/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DK-Fou/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DK-Fou/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DK-Fou/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DK-Fou/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DK-Lva/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DK-Lva/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DK-Lva/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DK-Lva/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DK-Lva/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DK-Lva/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DK-Lva/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DK-Lva/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DK-Ris/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DK-Ris/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DK-Ris/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DK-Ris/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DK-Ris/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DK-Ris/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DK-Ris/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DK-Ris/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DK-Sor/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DK-Sor/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DK-Sor/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DK-Sor/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DK-Sor/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DK-Sor/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DK-Sor/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DK-Sor/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/DK-ZaH/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/DK-ZaH/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DK-ZaH/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/DK-ZaH/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/DK-ZaH/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/DK-ZaH/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/DK-ZaH/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/DK-ZaH/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/ES-ES1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/ES-ES1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ES-ES1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/ES-ES1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/ES-ES1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/ES-ES1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ES-ES1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/ES-ES1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/ES-ES2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/ES-ES2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ES-ES2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/ES-ES2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/ES-ES2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/ES-ES2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ES-ES2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/ES-ES2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/ES-LMa/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/ES-LMa/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ES-LMa/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/ES-LMa/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/ES-LMa/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/ES-LMa/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ES-LMa/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/ES-LMa/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/ES-LgS/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/ES-LgS/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ES-LgS/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/ES-LgS/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/ES-LgS/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/ES-LgS/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ES-LgS/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/ES-LgS/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/ES-VDA/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/ES-VDA/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ES-VDA/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/ES-VDA/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/ES-VDA/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/ES-VDA/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ES-VDA/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/ES-VDA/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/FI-Hyy/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/FI-Hyy/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FI-Hyy/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/FI-Hyy/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/FI-Hyy/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/FI-Hyy/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FI-Hyy/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/FI-Hyy/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/FI-Kaa/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/FI-Kaa/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FI-Kaa/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/FI-Kaa/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/FI-Kaa/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/FI-Kaa/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FI-Kaa/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/FI-Kaa/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/FI-Lom/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/FI-Lom/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FI-Lom/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/FI-Lom/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/FI-Lom/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/FI-Lom/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FI-Lom/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/FI-Lom/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/FI-Sod/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/FI-Sod/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FI-Sod/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/FI-Sod/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/FI-Sod/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/FI-Sod/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FI-Sod/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/FI-Sod/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Fon/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Fon/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Fon/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Fon/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Fon/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Fon/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Fon/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Fon/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Gri/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Gri/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Gri/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Gri/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Gri/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Gri/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Gri/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Gri/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Hes/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Hes/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Hes/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Hes/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Hes/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Hes/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Hes/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Hes/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-LBr/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/FR-LBr/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-LBr/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-LBr/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-LBr/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/FR-LBr/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-LBr/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-LBr/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Lq1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Lq1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Lq1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Lq1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Lq1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Lq1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Lq1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Lq1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Lq2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Lq2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Lq2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Lq2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Lq2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Lq2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Lq2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Lq2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Pue/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Pue/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Pue/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Pue/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/FR-Pue/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/FR-Pue/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/FR-Pue/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/FR-Pue/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/GF-Guy/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/GF-Guy/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/GF-Guy/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/GF-Guy/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/GF-Guy/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/GF-Guy/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/GF-Guy/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/GF-Guy/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/HU-Bug/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/HU-Bug/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/HU-Bug/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/HU-Bug/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/HU-Bug/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/HU-Bug/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/HU-Bug/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/HU-Bug/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/ID-Pag/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/ID-Pag/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ID-Pag/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/ID-Pag/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/ID-Pag/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/ID-Pag/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ID-Pag/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/ID-Pag/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IE-Ca1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IE-Ca1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IE-Ca1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IE-Ca1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IE-Ca1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IE-Ca1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IE-Ca1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IE-Ca1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IE-Dri/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IE-Dri/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IE-Dri/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IE-Dri/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IE-Dri/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IE-Dri/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IE-Dri/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IE-Dri/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Amp/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Amp/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Amp/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Amp/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Amp/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Amp/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Amp/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Amp/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-BCi/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-BCi/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-BCi/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-BCi/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-BCi/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-BCi/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-BCi/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-BCi/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-CA1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-CA1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-CA1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-CA1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-CA1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-CA1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-CA1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-CA1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-CA2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-CA2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-CA2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-CA2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-CA2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-CA2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-CA2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-CA2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-CA3/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-CA3/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-CA3/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-CA3/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-CA3/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-CA3/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-CA3/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-CA3/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Col/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Col/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Col/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Col/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Col/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Col/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Col/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Col/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Cpz/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Cpz/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Cpz/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Cpz/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Cpz/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Cpz/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Cpz/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Cpz/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Isp/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Isp/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Isp/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Isp/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Isp/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Isp/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Isp/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Isp/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-LMa/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-LMa/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-LMa/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-LMa/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-LMa/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-LMa/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-LMa/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-LMa/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Lav/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Lav/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Lav/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Lav/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Lav/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Lav/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Lav/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Lav/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-MBo/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-MBo/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-MBo/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-MBo/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-MBo/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-MBo/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-MBo/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-MBo/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Mal/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Mal/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Mal/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Mal/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Mal/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Mal/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Mal/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Mal/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Noe/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Noe/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Noe/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Noe/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Noe/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Noe/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Noe/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Noe/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Non/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Non/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Non/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Non/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Non/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Non/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Non/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Non/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-PT1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-PT1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-PT1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-PT1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-PT1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-PT1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-PT1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-PT1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Ren/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Ren/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Ren/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Ren/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Ren/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Ren/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Ren/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Ren/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Ro1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Ro1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Ro1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Ro1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Ro1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Ro1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Ro1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Ro1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Ro2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Ro2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Ro2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Ro2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-Ro2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-Ro2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-Ro2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-Ro2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-SR2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-SR2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-SR2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-SR2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-SR2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-SR2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-SR2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-SR2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-SRo/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/IT-SRo/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-SRo/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-SRo/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/IT-SRo/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/IT-SRo/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/IT-SRo/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/IT-SRo/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/JP-SMF/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/JP-SMF/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/JP-SMF/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/JP-SMF/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/JP-SMF/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/JP-SMF/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/JP-SMF/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/JP-SMF/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/NL-Ca1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/NL-Ca1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/NL-Ca1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/NL-Ca1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/NL-Ca1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/NL-Ca1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/NL-Ca1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/NL-Ca1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/NL-Hor/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/NL-Hor/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/NL-Hor/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/NL-Hor/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/NL-Hor/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/NL-Hor/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/NL-Hor/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/NL-Hor/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/NL-Loo/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/NL-Loo/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/NL-Loo/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/NL-Loo/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/NL-Loo/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/NL-Loo/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/NL-Loo/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/NL-Loo/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/PL-wet/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/PL-wet/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/PL-wet/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/PL-wet/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/PL-wet/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/PL-wet/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/PL-wet/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/PL-wet/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/PT-Esp/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/PT-Esp/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/PT-Esp/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/PT-Esp/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/PT-Esp/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/PT-Esp/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/PT-Esp/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/PT-Esp/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/PT-Mi1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/PT-Mi1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/PT-Mi1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/PT-Mi1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/PT-Mi1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/PT-Mi1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/PT-Mi1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/PT-Mi1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/PT-Mi2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/PT-Mi2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/PT-Mi2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/PT-Mi2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/PT-Mi2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/PT-Mi2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/PT-Mi2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/PT-Mi2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/RU-Che/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/RU-Che/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/RU-Che/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/RU-Che/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/RU-Che/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/RU-Che/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/RU-Che/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/RU-Che/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/RU-Fyo/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/RU-Fyo/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/RU-Fyo/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/RU-Fyo/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/RU-Fyo/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/RU-Fyo/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/RU-Fyo/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/RU-Fyo/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/RU-Zot/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/RU-Zot/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/RU-Zot/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/RU-Zot/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/RU-Zot/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/RU-Zot/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/RU-Zot/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/RU-Zot/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/SD-Dem/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/SD-Dem/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/SD-Dem/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/SD-Dem/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/SD-Dem/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/SD-Dem/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/SD-Dem/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/SD-Dem/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/SE-Deg/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/SE-Deg/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/SE-Deg/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/SE-Deg/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/SE-Deg/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/SE-Deg/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/SE-Deg/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/SE-Deg/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/UK-Gri/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/UK-Gri/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/UK-Gri/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/UK-Gri/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/UK-Gri/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/UK-Gri/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/UK-Gri/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/UK-Gri/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/UK-Ham/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/UK-Ham/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/UK-Ham/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/UK-Ham/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/UK-Ham/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/UK-Ham/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/UK-Ham/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/UK-Ham/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/UK-PL3/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/UK-PL3/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/UK-PL3/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/UK-PL3/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/UK-PL3/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/UK-PL3/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/UK-PL3/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/UK-PL3/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-AR1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-AR1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-AR1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-AR1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-AR1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-AR1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-AR1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-AR1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-AR2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-AR2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-AR2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-AR2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-AR2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-AR2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-AR2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-AR2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-ARM/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-ARM/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-ARM/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-ARM/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-ARM/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-ARM/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-ARM/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-ARM/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Aud/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Aud/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Aud/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Aud/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Aud/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Aud/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Aud/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Aud/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Bar/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Bar/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Bar/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Bar/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Bar/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Bar/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Bar/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Bar/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Bkg/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Bkg/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Bkg/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Bkg/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Bkg/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Bkg/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Bkg/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Bkg/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Blo/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Blo/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Blo/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Blo/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Blo/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Blo/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Blo/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Blo/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Bo1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Bo1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Bo1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Bo1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Bo1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Bo1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Bo1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Bo1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Cop/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Cop/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Cop/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Cop/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Cop/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Cop/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Cop/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Cop/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-FPe/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-FPe/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-FPe/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-FPe/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-FPe/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-FPe/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-FPe/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-FPe/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-GLE/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-GLE/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-GLE/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-GLE/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-GLE/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-GLE/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-GLE/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-GLE/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Goo/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Goo/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Goo/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Goo/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Goo/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Goo/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Goo/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Goo/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ha1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ha1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ha1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ha1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ha1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ha1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ha1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ha1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ho1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ho1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ho1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ho1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ho1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ho1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ho1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ho1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-KS2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-KS2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-KS2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-KS2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-KS2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-KS2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-KS2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-KS2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Los/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Los/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Los/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Los/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Los/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Los/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Los/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Los/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-MMS/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-MMS/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-MMS/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-MMS/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-MMS/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-MMS/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-MMS/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-MMS/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-MOz/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-MOz/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-MOz/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-MOz/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-MOz/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-MOz/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-MOz/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-MOz/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Me2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Me2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Me2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Me2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Me2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Me2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Me2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Me2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Me4/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Me4/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Me4/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Me4/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Me4/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Me4/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Me4/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Me4/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Me6/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Me6/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Me6/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Me6/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Me6/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Me6/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Me6/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Me6/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Myb/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Myb/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Myb/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Myb/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Myb/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Myb/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Myb/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Myb/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-NR1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-NR1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-NR1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-NR1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-NR1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-NR1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-NR1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-NR1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ne1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ne1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ne1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ne1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ne1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ne1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ne1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ne1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ne2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ne2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ne2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ne2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ne2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ne2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ne2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ne2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ne3/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ne3/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ne3/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ne3/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ne3/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ne3/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ne3/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ne3/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-PFa/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-PFa/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-PFa/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-PFa/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-PFa/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-PFa/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-PFa/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-PFa/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Prr/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Prr/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Prr/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Prr/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Prr/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Prr/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Prr/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Prr/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-SP1/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-SP1/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-SP1/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-SP1/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-SP1/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-SP1/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-SP1/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-SP1/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-SP2/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-SP2/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-SP2/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-SP2/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-SP2/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-SP2/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-SP2/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-SP2/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-SP3/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-SP3/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-SP3/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-SP3/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-SP3/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-SP3/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-SP3/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-SP3/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-SRG/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-SRG/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-SRG/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-SRG/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-SRG/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-SRG/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-SRG/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-SRG/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-SRM/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-SRM/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-SRM/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-SRM/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-SRM/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-SRM/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-SRM/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-SRM/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Syv/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Syv/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Syv/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Syv/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Syv/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Syv/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Syv/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Syv/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ton/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ton/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ton/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ton/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Ton/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Ton/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Ton/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Ton/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Tw4/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Tw4/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Tw4/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Tw4/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Tw4/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Tw4/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Tw4/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Tw4/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Twt/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Twt/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Twt/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Twt/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Twt/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Twt/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Twt/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Twt/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-UMB/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-UMB/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-UMB/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-UMB/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-UMB/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-UMB/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-UMB/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-UMB/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Var/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Var/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Var/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Var/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Var/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Var/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Var/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Var/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-WCr/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-WCr/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-WCr/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-WCr/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-WCr/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-WCr/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-WCr/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-WCr/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Whs/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Whs/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Whs/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Whs/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Whs/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Whs/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Whs/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Whs/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Wkg/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/US-Wkg/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Wkg/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Wkg/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/US-Wkg/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/US-Wkg/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/US-Wkg/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/US-Wkg/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/ZA-Kru/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/ZA-Kru/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ZA-Kru/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/ZA-Kru/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/ZA-Kru/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/ZA-Kru/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ZA-Kru/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/ZA-Kru/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/ZM-Mon/include_user_mods b/cime_config/usermods_dirs/clm/PLUMBER2/ZM-Mon/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ZM-Mon/include_user_mods rename to cime_config/usermods_dirs/clm/PLUMBER2/ZM-Mon/include_user_mods diff --git a/cime_config/usermods_dirs/PLUMBER2/ZM-Mon/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/ZM-Mon/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/ZM-Mon/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/ZM-Mon/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/defaults/shell_commands b/cime_config/usermods_dirs/clm/PLUMBER2/defaults/shell_commands similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/defaults/shell_commands rename to cime_config/usermods_dirs/clm/PLUMBER2/defaults/shell_commands diff --git a/cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_clm b/cime_config/usermods_dirs/clm/PLUMBER2/defaults/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_clm rename to cime_config/usermods_dirs/clm/PLUMBER2/defaults/user_nl_clm diff --git a/cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_cpl b/cime_config/usermods_dirs/clm/PLUMBER2/defaults/user_nl_cpl similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_cpl rename to cime_config/usermods_dirs/clm/PLUMBER2/defaults/user_nl_cpl diff --git a/cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_datm_streams b/cime_config/usermods_dirs/clm/PLUMBER2/defaults/user_nl_datm_streams similarity index 100% rename from cime_config/usermods_dirs/PLUMBER2/defaults/user_nl_datm_streams rename to cime_config/usermods_dirs/clm/PLUMBER2/defaults/user_nl_datm_streams diff --git a/cime_config/usermods_dirs/_includes/README b/cime_config/usermods_dirs/clm/_includes/README similarity index 100% rename from cime_config/usermods_dirs/_includes/README rename to cime_config/usermods_dirs/clm/_includes/README diff --git a/cime_config/usermods_dirs/_includes/cmip6_carbon_isotopes/user_nl_clm b/cime_config/usermods_dirs/clm/_includes/cmip6_carbon_isotopes/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/_includes/cmip6_carbon_isotopes/user_nl_clm rename to cime_config/usermods_dirs/clm/_includes/cmip6_carbon_isotopes/user_nl_clm diff --git a/cime_config/usermods_dirs/_includes/cmip6_glaciers_cplhist/user_nl_cpl b/cime_config/usermods_dirs/clm/_includes/cmip6_glaciers_cplhist/user_nl_cpl similarity index 100% rename from cime_config/usermods_dirs/_includes/cmip6_glaciers_cplhist/user_nl_cpl rename to cime_config/usermods_dirs/clm/_includes/cmip6_glaciers_cplhist/user_nl_cpl diff --git a/cime_config/usermods_dirs/_includes/cmip6_glaciers_virtual_antarctica/user_nl_clm b/cime_config/usermods_dirs/clm/_includes/cmip6_glaciers_virtual_antarctica/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/_includes/cmip6_glaciers_virtual_antarctica/user_nl_clm rename to cime_config/usermods_dirs/clm/_includes/cmip6_glaciers_virtual_antarctica/user_nl_clm diff --git a/cime_config/usermods_dirs/_includes/output_base/README b/cime_config/usermods_dirs/clm/_includes/output_base/README similarity index 100% rename from cime_config/usermods_dirs/_includes/output_base/README rename to cime_config/usermods_dirs/clm/_includes/output_base/README diff --git a/cime_config/usermods_dirs/_includes/output_base/user_nl_clm b/cime_config/usermods_dirs/clm/_includes/output_base/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/_includes/output_base/user_nl_clm rename to cime_config/usermods_dirs/clm/_includes/output_base/user_nl_clm diff --git a/cime_config/usermods_dirs/_includes/output_base_highfreq/README b/cime_config/usermods_dirs/clm/_includes/output_base_highfreq/README similarity index 100% rename from cime_config/usermods_dirs/_includes/output_base_highfreq/README rename to cime_config/usermods_dirs/clm/_includes/output_base_highfreq/README diff --git a/cime_config/usermods_dirs/_includes/output_base_highfreq/include_user_mods b/cime_config/usermods_dirs/clm/_includes/output_base_highfreq/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/_includes/output_base_highfreq/include_user_mods rename to cime_config/usermods_dirs/clm/_includes/output_base_highfreq/include_user_mods diff --git a/cime_config/usermods_dirs/_includes/output_base_highfreq/user_nl_clm b/cime_config/usermods_dirs/clm/_includes/output_base_highfreq/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/_includes/output_base_highfreq/user_nl_clm rename to cime_config/usermods_dirs/clm/_includes/output_base_highfreq/user_nl_clm diff --git a/cime_config/usermods_dirs/cmip6_deck/include_user_mods b/cime_config/usermods_dirs/clm/cmip6_deck/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/cmip6_deck/include_user_mods rename to cime_config/usermods_dirs/clm/cmip6_deck/include_user_mods diff --git a/cime_config/usermods_dirs/cmip6_evolving_icesheet/include_user_mods b/cime_config/usermods_dirs/clm/cmip6_evolving_icesheet/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/cmip6_evolving_icesheet/include_user_mods rename to cime_config/usermods_dirs/clm/cmip6_evolving_icesheet/include_user_mods diff --git a/cime_config/usermods_dirs/cmip6_evolving_icesheet/user_nl_clm b/cime_config/usermods_dirs/clm/cmip6_evolving_icesheet/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/cmip6_evolving_icesheet/user_nl_clm rename to cime_config/usermods_dirs/clm/cmip6_evolving_icesheet/user_nl_clm diff --git a/cime_config/usermods_dirs/cmip6_waccm_deck/README b/cime_config/usermods_dirs/clm/cmip6_waccm_deck/README similarity index 100% rename from cime_config/usermods_dirs/cmip6_waccm_deck/README rename to cime_config/usermods_dirs/clm/cmip6_waccm_deck/README diff --git a/cime_config/usermods_dirs/cmip6_waccm_deck/include_user_mods b/cime_config/usermods_dirs/clm/cmip6_waccm_deck/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/cmip6_waccm_deck/include_user_mods rename to cime_config/usermods_dirs/clm/cmip6_waccm_deck/include_user_mods diff --git a/cime_config/usermods_dirs/cmip6_waccm_deck/shell_commands b/cime_config/usermods_dirs/clm/cmip6_waccm_deck/shell_commands similarity index 100% rename from cime_config/usermods_dirs/cmip6_waccm_deck/shell_commands rename to cime_config/usermods_dirs/clm/cmip6_waccm_deck/shell_commands diff --git a/cime_config/usermods_dirs/cmip6_waccm_nociso_deck/README b/cime_config/usermods_dirs/clm/cmip6_waccm_nociso_deck/README similarity index 100% rename from cime_config/usermods_dirs/cmip6_waccm_nociso_deck/README rename to cime_config/usermods_dirs/clm/cmip6_waccm_nociso_deck/README diff --git a/cime_config/usermods_dirs/cmip6_waccm_nociso_deck/include_user_mods b/cime_config/usermods_dirs/clm/cmip6_waccm_nociso_deck/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/cmip6_waccm_nociso_deck/include_user_mods rename to cime_config/usermods_dirs/clm/cmip6_waccm_nociso_deck/include_user_mods diff --git a/cime_config/usermods_dirs/f09_37x288pt_PanBoreal/shell_commands b/cime_config/usermods_dirs/clm/f09_37x288pt_PanBoreal/shell_commands similarity index 100% rename from cime_config/usermods_dirs/f09_37x288pt_PanBoreal/shell_commands rename to cime_config/usermods_dirs/clm/f09_37x288pt_PanBoreal/shell_commands diff --git a/cime_config/usermods_dirs/f09_37x288pt_PanBoreal/user_nl_clm b/cime_config/usermods_dirs/clm/f09_37x288pt_PanBoreal/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/f09_37x288pt_PanBoreal/user_nl_clm rename to cime_config/usermods_dirs/clm/f09_37x288pt_PanBoreal/user_nl_clm diff --git a/cime_config/usermods_dirs/fates_sp/user_nl_clm b/cime_config/usermods_dirs/clm/fates_sp/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/fates_sp/user_nl_clm rename to cime_config/usermods_dirs/clm/fates_sp/user_nl_clm diff --git a/cime_config/usermods_dirs/lilac/README b/cime_config/usermods_dirs/clm/lilac/README similarity index 100% rename from cime_config/usermods_dirs/lilac/README rename to cime_config/usermods_dirs/clm/lilac/README diff --git a/cime_config/usermods_dirs/lilac/user_nl_ctsm b/cime_config/usermods_dirs/clm/lilac/user_nl_ctsm similarity index 100% rename from cime_config/usermods_dirs/lilac/user_nl_ctsm rename to cime_config/usermods_dirs/clm/lilac/user_nl_ctsm diff --git a/cime_config/usermods_dirs/newton_krylov_spinup/README b/cime_config/usermods_dirs/clm/newton_krylov_spinup/README similarity index 100% rename from cime_config/usermods_dirs/newton_krylov_spinup/README rename to cime_config/usermods_dirs/clm/newton_krylov_spinup/README diff --git a/cime_config/usermods_dirs/newton_krylov_spinup/shell_commands b/cime_config/usermods_dirs/clm/newton_krylov_spinup/shell_commands similarity index 100% rename from cime_config/usermods_dirs/newton_krylov_spinup/shell_commands rename to cime_config/usermods_dirs/clm/newton_krylov_spinup/shell_commands diff --git a/cime_config/usermods_dirs/newton_krylov_spinup/user_nl_clm b/cime_config/usermods_dirs/clm/newton_krylov_spinup/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/newton_krylov_spinup/user_nl_clm rename to cime_config/usermods_dirs/clm/newton_krylov_spinup/user_nl_clm diff --git a/cime_config/usermods_dirs/output_bgc/include_user_mods b/cime_config/usermods_dirs/clm/output_bgc/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/output_bgc/include_user_mods rename to cime_config/usermods_dirs/clm/output_bgc/include_user_mods diff --git a/cime_config/usermods_dirs/output_bgc/user_nl_clm b/cime_config/usermods_dirs/clm/output_bgc/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/output_bgc/user_nl_clm rename to cime_config/usermods_dirs/clm/output_bgc/user_nl_clm diff --git a/cime_config/usermods_dirs/output_bgc_highfreq/include_user_mods b/cime_config/usermods_dirs/clm/output_bgc_highfreq/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/output_bgc_highfreq/include_user_mods rename to cime_config/usermods_dirs/clm/output_bgc_highfreq/include_user_mods diff --git a/cime_config/usermods_dirs/output_bgc_highfreq/user_nl_clm b/cime_config/usermods_dirs/clm/output_bgc_highfreq/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/output_bgc_highfreq/user_nl_clm rename to cime_config/usermods_dirs/clm/output_bgc_highfreq/user_nl_clm diff --git a/cime_config/usermods_dirs/output_crop/include_user_mods b/cime_config/usermods_dirs/clm/output_crop/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/output_crop/include_user_mods rename to cime_config/usermods_dirs/clm/output_crop/include_user_mods diff --git a/cime_config/usermods_dirs/output_crop/user_nl_clm b/cime_config/usermods_dirs/clm/output_crop/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/output_crop/user_nl_clm rename to cime_config/usermods_dirs/clm/output_crop/user_nl_clm diff --git a/cime_config/usermods_dirs/output_crop_highfreq/include_user_mods b/cime_config/usermods_dirs/clm/output_crop_highfreq/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/output_crop_highfreq/include_user_mods rename to cime_config/usermods_dirs/clm/output_crop_highfreq/include_user_mods diff --git a/cime_config/usermods_dirs/output_sp/include_user_mods b/cime_config/usermods_dirs/clm/output_sp/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/output_sp/include_user_mods rename to cime_config/usermods_dirs/clm/output_sp/include_user_mods diff --git a/cime_config/usermods_dirs/output_sp/user_nl_clm b/cime_config/usermods_dirs/clm/output_sp/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/output_sp/user_nl_clm rename to cime_config/usermods_dirs/clm/output_sp/user_nl_clm diff --git a/cime_config/usermods_dirs/output_sp_exice/include_user_mods b/cime_config/usermods_dirs/clm/output_sp_exice/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/output_sp_exice/include_user_mods rename to cime_config/usermods_dirs/clm/output_sp_exice/include_user_mods diff --git a/cime_config/usermods_dirs/output_sp_exice/user_nl_clm b/cime_config/usermods_dirs/clm/output_sp_exice/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/output_sp_exice/user_nl_clm rename to cime_config/usermods_dirs/clm/output_sp_exice/user_nl_clm diff --git a/cime_config/usermods_dirs/output_sp_highfreq/include_user_mods b/cime_config/usermods_dirs/clm/output_sp_highfreq/include_user_mods similarity index 100% rename from cime_config/usermods_dirs/output_sp_highfreq/include_user_mods rename to cime_config/usermods_dirs/clm/output_sp_highfreq/include_user_mods diff --git a/cime_config/usermods_dirs/output_sp_highfreq/user_nl_clm b/cime_config/usermods_dirs/clm/output_sp_highfreq/user_nl_clm similarity index 100% rename from cime_config/usermods_dirs/output_sp_highfreq/user_nl_clm rename to cime_config/usermods_dirs/clm/output_sp_highfreq/user_nl_clm diff --git a/components/cdeps b/components/cdeps index 7b0b3a8272..0750c91753 160000 --- a/components/cdeps +++ b/components/cdeps @@ -1 +1 @@ -Subproject commit 7b0b3a827241c53d296ec877cb1f59966bf5e5bf +Subproject commit 0750c9175395d3ba3bf8eba65703dee230d08572 diff --git a/components/cmeps b/components/cmeps index 47fb4e633a..a91cedfe58 160000 --- a/components/cmeps +++ b/components/cmeps @@ -1 +1 @@ -Subproject commit 47fb4e633a76ec6d60969b1af751f90790387246 +Subproject commit a91cedfe58658a9fc391195481137a2d83372c25 diff --git a/components/mizuRoute b/components/mizuRoute index 81c720c7ee..2ff305a029 160000 --- a/components/mizuRoute +++ b/components/mizuRoute @@ -1 +1 @@ -Subproject commit 81c720c7ee51f9c69f2934f696078c42f4493565 +Subproject commit 2ff305a0292cb06789de6cfea7ad3cc0d6173493 diff --git a/doc/.ChangeLog_template b/doc/.ChangeLog_template index c95ea482e3..579f3c68e2 100644 --- a/doc/.ChangeLog_template +++ b/doc/.ChangeLog_template @@ -20,8 +20,6 @@ Does this tag change answers significantly for any of the following physics conf [ ] clm6_0 -[ ] clm5_1 - [ ] clm5_0 [ ] ctsm5_0-nwp diff --git a/doc/ChangeLog b/doc/ChangeLog index 660aed7921..03faca2e66 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,14 +1,12 @@ =============================================================== -Tag name: ctsm5.3.014 +Tag name: ctsm5.3.018 Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310) -Date: Fri 15 Nov 2024 01:24:45 PM MST +Date: Thu 09 Jan 2025 04:32:03 PM MST One-line Summary: Change history time to be the middle of the time bounds Purpose and description of changes ---------------------------------- - - Making the change in order to be consistent with CAM and to make history output more intuitive. - + Making the change to be consistent with CAM and to make history output more intuitive. Significant changes to scientifically-supported configurations -------------------------------------------------------------- @@ -41,10 +39,10 @@ Caveats for users (e.g., need to interpolate initial conditions): Instantaneous history tapes now do not include time bounds. Mixed history tapes do not change the treatment of instantaneous fields or move them to separate tapes, yet. - Notes of particular relevance for developers: --------------------------------------------- Caveats for developers (e.g., code that is duplicated that requires double maintenance): + Same changes are needed separately in clm, in mosart, and in rtm. Changes to tests or testing: This tag introduces changes to the mosart/rtm testlists. @@ -60,15 +58,15 @@ Testing summary: regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): - derecho ----- OK - izumi ------- OK + derecho ----- previously OK, will repeat + izumi ------- previously OK, will repeat mosart - derecho ----- OK - izumi ------- OK + derecho ----- previously OK, will repeat + izumi ------- previously OK, will repeat rtm - derecho ----- OK + derecho ----- previously OK, will repeat any other testing (give details below): @@ -101,6 +99,801 @@ Pull Requests that document the changes (include PR ids): https://github.com/ESCOMP/MOSART/pull/106 https://github.com/ESCOMP/RTM/pull/39 +=============================================================== +=============================================================== +Tag name: ctsm5.3.017 +Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310) +Date: Thu 09 Jan 2025 11:56:43 AM MST +One-line Summary: Merge tmp-241219 branch to master + +Purpose and description of changes +---------------------------------- + +Includes three tmp-241219 tags: + tmp-241219.n01.ctsm5.3.016 Merge b4b-dev: + nfix_method options Houlton (default), Bytnerowicz (option) + tmp-241219.n02.ctsm5.3.016 FATES hydro test update + tmp-241219.n03.ctsm5.3.016 Bug fix for izumi nag tests to pass (b4b unless using Bytnerowicz) + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + Each separate tag documents this information below. + +Notes of particular relevance for users +--------------------------------------- +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + nfix_method as explained in tmp-241219.n01.ctsm5.3.016 tag below. + +Notes of particular relevance for developers: +--------------------------------------------- +Changes to tests or testing: + New tests as documented in tmp-241219.n03.ctsm5.3.016 tag below. + +Testing summary: +---------------- + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK (baseline linked to tmp-241219.n03.ctsm5.3.016) + izumi ------- OK (baseline linked to tmp-241219.n03.ctsm5.3.016) + + fates tests: + derecho ----- No new testing; last baseline is fates-sci.1.80.4_api.37.0.0-tmp-241219.n02.ctsm5.3.016 + izumi ------- No new testing; see tmp-241219.n02.ctsm5.3.016 tag below + +Answer changes +-------------- + +Changes answers relative to baseline: Yes, only for aux_clm fates testmods + + Same comment as in tmp-241219.n02.ctsm5.3.016 tag: + The FATES tag update includes a number of science and bug fix updates since the + last fates tag update, which results in non-B4B changes. These have been reviewed + and differ as expected. + + Also, see caveat in Answer changes for tag tmp-241219.n01.ctsm5.3.016. + +Other details +------------- +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): + fates updated to sci.1.80.4_api.37.0.0 + +Pull Requests that document the changes (include PR ids): + https://github.com/ESCOMP/ctsm/pull/2928 + +=============================================================== +=============================================================== +Tag name: tmp-241219.n03.ctsm5.3.016 +Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310) +Date: Thu 09 Jan 2025 11:39:37 AM MST +One-line Summary: Bug fix for izumi nag tests to pass + +Purpose and description of changes +---------------------------------- + Allocation statements should have been (0:mxpft) instead of (mxpft). + I introduced the bug in a small refactor requested in #2917. + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + Fixes #2924 + +Notes of particular relevance for developers: +--------------------------------------------- +Changes to tests or testing: + Added tests that I should have added in the tmp-241219.n01.ctsm5.3.016 tag: + ERP_D_Ld5_P48x1.f10_f10_mg37.I2000Clm50BgcCru.izumi_nag.clm-flexCN_FUN_BNF + ERP_D_Ld5_P48x1.f10_f10_mg37.I2000Clm50BgcCru.derecho_intel.clm-flexCN_FUN_BNF + +Testing summary: +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + derecho used tmp-241219.n02.ctsm5.3.016 (i.e. the previous tag) + izumi used ctsm5.3.016 because it was the best available baseline + +Answer changes +-------------- + +Changes answers relative to baseline: No but read caveat. + + Summarize any changes to answers, i.e., + - what code configurations: a few Fates cases + - what platforms/compilers: izumi; only because I compared to ctsm5.3.016 + - nature of change: same as in the tmp-241219.n02.ctsm5.3.016 tag + + Note: Also on izumi I see the following failure in all the tests that 'failed to initialize' + that I had to go back to build and run, whether with ./case.build or ./create_test. For example: + FAIL ERP_D_Ld5_P48x1.f10_f10_mg37.I2000Clm50BgcCru.izumi_nag.clm-noFUN_flexCN BASELINE ctsm5.3.016: ERROR CPRNC failed to open files + I am aware that others have also seen this behavior. + +Other details +------------- +Pull Requests that document the changes (include PR ids): + https://github.com/ESCOMP/ctsm/pull/2925 + +=============================================================== +=============================================================== +Tag name: tmp-241219.n02.ctsm5.3.016 +Originator(s): glemieux (Gregory Lemieux, LBNL, glemieux@lbl.gov) +Date: Wed 08 Jan 2025 10:52:49 AM MST +One-line Summary: FATES hydro test update + +Purpose and description of changes +---------------------------------- + +This minor update reverts a temporary work around for FATES hydro system tests. +The FATES tag is updated to capture the FATES-side fix to the issue that predicated +the temporary testing workaround. + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + + #2878 - Remove fates_allom_smode shell_command update in FatesColdHydro testmod + +Notes of particular relevance for developers: +--------------------------------------------- +Changes to tests or testing: + FATES hydro tests will no long build a custom parameter file on the fly + The one FATES PVT test has been added to expected failure per #2919 + +Testing summary: regular + fates +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK (see #2924) + + fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates--) + derecho ----- OK + izumi ------- OK + + +Answer changes +-------------- + +Changes answers relative to baseline: Yes, but only for aux_clm fates testmods + + The FATES tag update includes a number of science and bug fix updates since the + last fates tag update, which results in non-B4B changes. These have been reviewed + and differ as expected. + +Other details +------------- +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): + fates: sci.1.79.3_api.37.0.0 -> sci.1.80.4_api.37.0.0 + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + https://github.com/ESCOMP/CTSM/pull/2882 + +=============================================================== +=============================================================== +Tag name: tmp-241219.n01.ctsm5.3.016 +Originator(s): slevis (Samuel Levis,UCAR/TSS,303-665-1310) +Date: Tue 24 Dec 2024 03:43:01 PM MST +One-line Summary: Merge b4b-dev + +Purpose and description of changes +---------------------------------- + + #2869 Update temperature cost function for symbiotic Nfix in FUN + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + Resolves #2869 + +Notes of particular relevance for users +--------------------------------------- +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + New namelist variable: nfix_method + +Changes made to namelist defaults (e.g., changed parameter values): + nfix_method default: Houlton + other available option: Bytnerowicz + + +Testing summary: +---------------- + + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - PASS + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- machine seems problematic at the moment + + +Answer changes +-------------- + +Changes answers relative to baseline: No, but read caveat. + + Summarize any changes to answers, i.e., + - what code configurations: tests with ciso_cwd_hr testmods + - what platforms/compilers: all + - nature of change: irrelevant + + Explanation: + "diff ctsm60_ciso_cwd_hr_params.c241119.asc ctsm60_params.c241119.asc" + differ ONLY in the value of ceta. The previous paramfile for ciso_cwd_hr + showed additional diffs, likely due to problems that we have seen before + when generating new paramfiles. The ciso_cwd_hr tests would not have shown + diffs had the previous paramfile been correct, so I only mention the diffs + here for the record. + + +Other details +------------- +Pull Requests that document the changes (include PR ids): + https://github.com/ESCOMP/ctsm/pull/2869 + +=============================================================== +=============================================================== +Tag name: ctsm5.3.016 +Originator(s): jedwards and erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Thu 19 Dec 2024 04:23:39 PM MST +One-line Summary: Rpointer files for restart now have the simulation timestamp in the filename + +Purpose and description of changes +---------------------------------- + +Add the simulation timestamp to the rpointer files. Also update submodules with this change +in CMEPS and CDEPS as well as updated cime to handle it. See the notes below for an explaination +about this. + +Add a "clm" level directory under usermods_dirs so that the component where user-mods reside +is declared and to make them function the same as test-mods. + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): + There are text files that CESM uses to keep track of how far simulations + have progressed. They are simple text files that point to the filename of the latest + restart file for that component. There is such a file for each component. So for CTSM I cases + that's: lnd, cpl, and atm (and rof if it's active). Normally for just extending the length + of a simulations -- the user doesn't have to worry about these files. + + However, if there was a problem when a simulation shut down, it's possible that + different components will have mismatched restarts and rpointer files. In the past this + meant figuring out what restart file should be pointed to in each component rpointer file + and correcting it by hand in an editor. There was only the final set of rpointer files that + was kept for a case. + + Now, with this update the lnd, cpl, and atm rpointer files have the simulation date in the filenames. + So it's easy to spot if the restarts are mismatched for one of the components. Also since + there are matching rpointer files for each time restarts are created it's now easier to make + sure restarts and rpointer files are all correctly matched. And for a user to take a set of restarts + and matching rpointer files to start up from for any part of an existing simulation to start from. + This means you don't have to hand edit the rpointer files and make sure you don't make a mistake + when you do. + + Old rpointer filenames: + rpointer.atm + rpointer.cpl + rpointer.lnd + + New names: + rpointer.atm.YYYY-MM-DD-SSSSS + rpointer.cpl.YYYY-MM-DD-SSSSS + rpointer.lnd.YYYY-MM-DD-SSSSS + + Where YYYY-MM-DD-SSSSS is the year month day and seconds into the day for the simulation timestamp + For example rpointer.lnd.2000-01-01-00000 for a rpointer file for starting at Jan/1st/2000 at midnight + + + NOTE: BACKWARDS COMPATIBLE + For all the components you can use both the new format or old format for the rpointer filenames. + So if you are restarting from an existing case before ctsm5.3.016 you CAN use those rpointer filenames + that don't have the timestamps in the name. + +Notes of particular relevance for developers: +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + There's a lot of testing that failed with this tag, that we'll need to fix soonish. + There are issues on the problems and they are marked as expected fails + + On Izumi I had to rebuild a bunch of tests as they failed with run_sys_tests submitted under ctsm_pylib. + + Note, also that MOSART and RTM were NOT updated to use the new format. + +Testing summary: regular +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - PASS (inventoryfileDNE fails as expected) + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - PASS + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: No bit-for-bit + +Other details +------------- + +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): cime, cmeps, cdeps + cime to cime6.1.49 + cmeps to cmeps1.0.32 + cdeps to cdeps1.0.61 + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + #2757 -- add timestamp to rpointer file + +=============================================================== +=============================================================== +Tag name: ctsm5.3.015 +Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Wed 18 Dec 2024 02:09:40 PM MST +One-line Summary: Update cdeps with cam7 nextsw cday changes + +Purpose and description of changes +---------------------------------- + +Update CDEPS with changes for CAM7 nextsw_cday handling. This changes answers +for CPLHIST cases. We also changed the cam7LndTuningMode tests to turn this on +for DATM to more closely match what CAM7 does. + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + Fixes: #2897 Update CDEPS to bring in DATM change regarding nextsw_cday changing answers in CPLHIST cases + +Notes of particular relevance for users +--------------------------------------- + +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + New namelist parameter for DATM: nextsw_cday_calc + defaults to cam6, set to cam7 for CPLHIST and specific tests + Only applies if iradsw is NOT 0 or 1 + + Here is the documention on this in the namelist_definitial XML for DATM: ++ For CPLHIST cases, this should agree with the version of CAM (or other atmosphere ++ model) used to generate the CPLHIST forcings; the valid values for this variable are ++ based on this: 'cam6' is appropriate for cases generated with the driver ordering in ++ CAM6 and earlier, and 'cam7' is appropriate for cases generated with the driver ++ ordering in CAM7 and later. ++ ++ For 'cam6', the next radiation timestep is set to the present time plus 2 timesteps ++ when mod(tod+dtime,delta_radsw)==0. For 'cam7', the next radiation timestep is set ++ to the present time plus 1 timestep when mod(tod,delta_radsw)==0. + +Notes of particular relevance for developers: +--------------------------------------------- + +Changes to tests or testing: + cam7LndTuningMode testmods changed so that iradsw==-1 (hourly) , and nextsw_cday_calc='cam7' + +Testing summary: regular +---------------- + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: Only for CPLHIST cases, otherwise bit-for-bit + + Summarize any changes to answers, i.e., + - what code configurations: Compsets with DATM^CPLHIST + - what platforms/compilers: All + - nature of change; larger than roundoff/same climate + +Other details +------------- + +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): cdeps share + cdeps to cdeps1.0.57 + share to share1.1.6 + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + #2900 -- Update cdeps with cam7 nextsw cday changes + +=============================================================== +=============================================================== +Tag name: ctsm5.3.014 +Originator(s): multiple (see contributors below) +Date: Tue 03 Dec 2024 04:31:03 PM MST +One-line Summary: Bring in several fixes for testing in the previous cesm3_0_beta03/04 tags + +Purpose and description of changes +---------------------------------- + +Fix a list of issues mostly for testing that came in with the cesm3_0_beta03 and cesm3_0_beta04 tags +for the science "chill" deadline bringing in the baseline science capabilities needed for the cesm3_0 release. + +List of things: + +- New polarcap grid +- Fix use_init_interp for several resolutions that had problems +- Remove clm5_1 physics option +- Newly needed surface datasets added to auto build in Makefile for mksurfdata_esmf +- Fix several individual tests that were failing +- Update to submodules to ones roughly based on cesm3_0_beta04 +- Add graceful error checking to the FATES parameter file tests that will get it working in some cases + +Contributors +------------ + @slevis-lmwg @ekluzek @adamrher @samsrabin + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + + #2861 -- Nag compiler mpi-serial tests are failing on Izumi after the OS upgrade + #2801 -- fsurdat file needed for NEON MOAB site bfb done testing + #2791 -- Add f19 16pft 1850 and Hist to list of surface dataset resolutions (for the PPE work) + #2780 -- New CN matrix fails with single point sites with the new ctsm5.3 datasets. + #2654 -- Failing tests for izumi_nag with mpi-serial in cesm3_0_alpha02a + #2640 -- Update submodules to cesm3_0_beta04 versions + #2548 -- ne0ARCTICne30x4 grid transient failure + #2544 -- Failing ne0CONUSne30x8_ne0CONUSne30x8_mt12 in CESM testing + #2486 -- Temporarily add back a T42 dataset for CAM + #2379 -- Deprecate clm5_1 physics with ctsm5.2.0 + #2294 -- use of mct_mod is deprecated + +Notes of particular relevance for users +--------------------------------------- +Changes to CTSM's user interface (e.g., new/renamed XML or namelist variables): + Removal of the clm5_1 physics option to CLM_PHYSICS_VERSION XML variable + +Changes made to namelist defaults (e.g., changed parameter values): + Add support for new grid: ne0np4.POLARCAP.ne30x4 + Add support for f19 and f45 16-pft surface datasets + Fix some finidat issues for: f19, VR grids + Remove more mention of vichydro in namelist defaults + +Notes of particular relevance for developers: +--------------------------------------------- + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + I think we should expand the shell_commands unit testing I added in FatesSetupParam. + usermod and testmod shell_commands can have tricky logic that's hard to get right and then + easy to break. Having unit testing that tests the tricky user mods (such as NEON and PLUMBER) + as well as this tricky FATES capability would help bring robustness, correctness and stability to this + part of the code. As well as the ability to make changes to this part and refactor to improve it. + As part of this I think adopting a bash unit tester (such as BATS) would be a good thing to do. + The other part is that I think we could add automated testing for this on push to PR's to master. + Future changes: + - Move FatesSetupParam to user-mod directory and activate for all FATES + - Add automated github test for the unit test there + - Adopt BATS for a bash unit test framework + - Add testing for NEON and PLUMBER2 shell_commands user-mod directories + +Changes to tests or testing: + Changes to lilac/sspmatrixcn tests needed for cime update + Clm51 tests changed to Clm60 + C96 tests changed to C96_C96_mt232 + Exact restart monthly length tests changed to days because of cime testing update + Exact restart 15 day length tests changed to 20 because of a cime testing bug + Some additional VR grid tests + FatesColdLandUse test requires a long name transient test now + New testmod include directory (FatesSetupParam) to setup to modify the FATES parameter file + Each of the testmods that need to modify the FATES parameter file then include FatesSetupParam + Add a unit-tester to the FatesSetupParam directory to make sure its functions work correctly + PFUNIT testing build infrastructure updated to use full ESMF library + +Testing summary: regular + fates + ctsm_sci +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - PASS (6 namelists are different than ctsm5.3.013, new 16pft for f19/f45 non-crop) + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - PASS + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + + fates tests: (give name of baseline if different from CTSM tagname, normally fates baselines are fates--) + derecho ----- OK + izumi ------- OK + + any other testing (give details below): + + ctsm_sci + derecho ---- OK + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: No bit-for-bit + +Other details +------------- + +List any git submodules updated (cime, rtm, mosart, cism, fates, etc.): + Update most of the submodules to ones based from cesm3_0_beta04 + - mizuRoute to cesm-coupling.n02_v2.1.3 + - ccs_config_cesm1.0.10 (beyond cesm3_0_beta04 for unit testing issues) + - cime6.1.37 (beyond cesm3_0_beta04 for unit testing issues) + - cmeps1.0.16 + - cdeps1.0.53 (behind cesm3_0_beta04 [at 1.0.57] to avoid nextsw_cday changes) + - share1.1.2 + - pio2_6_3 + + mct removed + MPIserial_2.5.1 added + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + - #2888 -- PR to master of all changes + - #2853 -- Update submodules to ones that are based on cesm3_0_alpha04a + - #2883 -- Update branch to latest master ctsm5.3.012 + - #2840 -- Fix single-point matrixCN fails + - #2840 -- bfb bug PR status: awaiting review PR status: ready size: small + - #2855 -- Improve CLMBuildNamelist ability to detect NEON runs + - #2716 -- add "polarcap" grid for cesm3 release enhancement + - #2834 -- f19 + f45 16pft fsurdat/landuse files to namelist_defaults_ctsm + Makefile + - #2808 -- Remove Clm51 references throughout or change to Clm60 + +=============================================================== +=============================================================== +Tag name: ctsm5.3.013 +Originator(s): erik (Erik Kluzek,UCAR/TSS,303-497-1326) +Date: Tue 26 Nov 2024 02:59:49 PM MST +One-line Summary: Merge b4b-dev + +Purpose and description of changes +---------------------------------- + +Bring in latest b4b-dev branch to main CTSM development. + +- Update git-fleximod +- Fix equation number in tech note +- Implement urbanl and urbanc coszen filters +- Make ALBGRD and ALBGRI active by default +- Some adjustments to control pylint for the RXCROPMATURITY python tests +- Run_sys_tests: Print test list in --verbose/--debug. + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + + [Put an [X] in the box for any configuration with significant answer changes.] + +[ ] clm6_0 + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Bugs fixed +---------- + +List of CTSM issues fixed (include CTSM Issue # and description) [one per line]: + Fixes #17 albgrd and albgri history fields depend on decomposition, for urban points + Fixes #747 In UrbanAlbedo: Create a filter for coszen>0 and operate over that + +Notes of particular relevance for users +--------------------------------------- + +Changes made to namelist defaults (e.g., changed parameter values): + ALBGRD/ALBGRI are now active by default on the h0 files + +Changes to documentation: Fixed equation number + +Notes of particular relevance for developers: +--------------------------------------------- +NOTE: Be sure to review the steps in README.CHECKLIST.master_tags as well as the coding style in the Developers Guide +[Remove any lines that don't apply. Remove entire section if nothing applies.] + +Caveats for developers (e.g., code that is duplicated that requires double maintenance): + +Changes to tests or testing: + Testlist that will be run is now output when --verbose/--debug is given to run_sys_tests + +Testing summary: regular +---------------- + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + build-namelist tests (if CLMBuildNamelist.pm has changed): + + derecho - PASS + + python testing (if python code has changed; see instructions in python/README.md; document testing done): + + derecho - PASS + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + derecho ----- OK + izumi ------- OK + +If the tag used for baseline comparisons was NOT the previous tag, note that here: + + +Answer changes +-------------- + +Changes answers relative to baseline: No bit-for-bit + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +(https://github.com/ESCOMP/ctsm/pull) + #2893 -- Merge b4b-dev + #2786 -- git fleximod + #2848 -- equation number in tech note + #2875 -- run_sys_tests log testlist for --verbose/--debug options + #2860 -- Remove num_solar and implement coszen filters in UrbanAlbedoMod.F90 + =============================================================== =============================================================== Tag name: ctsm5.3.012 diff --git a/doc/ChangeSum b/doc/ChangeSum index 25569e9108..4e76b74c0b 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,6 +1,14 @@ Tag Who Date Summary ============================================================================================================================ - ctsm5.3.014 slevis 11/18/2024 Change history time to be the middle of the time bounds + ctsm5.3.018 slevis 01/??/2025 Change history time to be the middle of the time bounds + ctsm5.3.017 slevis 01/09/2025 Merge tmp-241219 branch to master +tmp-241219.n03.ctsm5.3.016 01/09/2025 Bug fix for izumi nag tests to pass (slevis) +tmp-241219.n02.ctsm5.3.016 01/08/2025 FATES hydro test update (glemieux) +tmp-241219.n01.ctsm5.3.016 12/24/2024 Merge b4b-dev (slevis) + ctsm5.3.016 erik 12/19/2024 Rpointer files for restart now have the simulation date in the filename + ctsm5.3.015 erik 12/18/2024 Update cdeps with cam7 nextsw cday changes + ctsm5.3.014 erik 12/03/2024 Bring in several fixes for testing in the previous cesm3_0_beta03/04 tags + ctsm5.3.013 erik 11/26/2024 Merge b4b-dev ctsm5.3.012 afoster 11/13/2024 update fates tag ctsm5.3.011 samrabin 11/11/2024 Improve handling of cold-start finidat ctsm5.3.010 afoster 11/09/2024 Merge b4b-dev diff --git a/doc/source/tech_note/Fluxes/CLM50_Tech_Note_Fluxes.rst b/doc/source/tech_note/Fluxes/CLM50_Tech_Note_Fluxes.rst index c759d11f92..05b35d8b34 100644 --- a/doc/source/tech_note/Fluxes/CLM50_Tech_Note_Fluxes.rst +++ b/doc/source/tech_note/Fluxes/CLM50_Tech_Note_Fluxes.rst @@ -1213,7 +1213,7 @@ The numerical solution for vegetation temperature and the fluxes of momentum, se #. Magnitude of the wind velocity incident on the leaves :math:`U_{av}` (:eq:`5.117` ) -#. Leaf boundary layer resistance :math:`r_{b}` (:eq:`5.136` ) +#. Leaf boundary layer resistance :math:`r_{b}` (:eq:`5.122` ) #. Aerodynamic resistances :math:`r_{ah} ^{{'} }` and :math:`r_{aw} ^{{'} }`(:eq:`5.116` ) diff --git a/doc/source/users_guide/running-special-cases/Running-with-custom-crop-calendars.rst b/doc/source/users_guide/running-special-cases/Running-with-custom-crop-calendars.rst index 878cc0d353..22009add51 100644 --- a/doc/source/users_guide/running-special-cases/Running-with-custom-crop-calendars.rst +++ b/doc/source/users_guide/running-special-cases/Running-with-custom-crop-calendars.rst @@ -93,4 +93,4 @@ The entire process can be illustrated with the RXCROPMATURITY system test. E.g.: :: - run_sys_tests -t RXCROPMATURITY_Lm61.f10_f10_mg37.IHistClm51BgcCrop.cheyenne_intel.clm-cropMonthOutput --skip-generate --skip-compare \ No newline at end of file + run_sys_tests -t RXCROPMATURITY_Lm61.f10_f10_mg37.IHistClm60BgcCrop.cheyenne_intel.clm-cropMonthOutput --skip-generate --skip-compare diff --git a/doc/source/users_guide/running-special-cases/Running-with-tillage.rst b/doc/source/users_guide/running-special-cases/Running-with-tillage.rst index 8cfcaa680b..bccaf0b946 100644 --- a/doc/source/users_guide/running-special-cases/Running-with-tillage.rst +++ b/doc/source/users_guide/running-special-cases/Running-with-tillage.rst @@ -18,10 +18,10 @@ Example: Crop simulation with no tillage ---------------------------------------- :: - > cime/scripts/create_newcase -case IHistClm51BgcCrop_notill -res f19_g17_gl4 -compset IHistClm51BgcCrop + > cime/scripts/create_newcase -case IHistClm60BgcCrop_notill -res f19_g17_gl4 -compset IHistClm60BgcCrop - > cd IHistClm51BgcCrop_notill + > cd IHistClm60BgcCrop_notill > ./case.setup # turn off tillage diff --git a/libraries/mct b/libraries/mct deleted file mode 160000 index 82b0071e69..0000000000 --- a/libraries/mct +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 82b0071e69d14330b75d23b0bc68543ebea9aadc diff --git a/libraries/mpi-serial b/libraries/mpi-serial new file mode 160000 index 0000000000..39416b7546 --- /dev/null +++ b/libraries/mpi-serial @@ -0,0 +1 @@ +Subproject commit 39416b754652bd281a89e86b37734aa5f3ffafd6 diff --git a/libraries/parallelio b/libraries/parallelio index f52ade0756..6539ef05ae 160000 --- a/libraries/parallelio +++ b/libraries/parallelio @@ -1 +1 @@ -Subproject commit f52ade075619b32fa141993b5665b0fe099befc2 +Subproject commit 6539ef05ae7584ec570a56fdab9f7dfb336c2b80 diff --git a/lilac/bld_templates/ctsm_template.cfg b/lilac/bld_templates/ctsm_template.cfg index 2cd018aa3c..63755f018b 100644 --- a/lilac/bld_templates/ctsm_template.cfg +++ b/lilac/bld_templates/ctsm_template.cfg @@ -26,7 +26,7 @@ finidat = UNSET # High-level configuration options # ------------------------------------------------------------------------ -# ctsm_phys: 'clm4_5', 'clm5_0', 'clm5_1' or "clm6_0" +# ctsm_phys: 'clm4_5', 'clm5_0', or "clm6_0" ctsm_phys = clm5_0 # configuration: 'nwp' or 'clm' diff --git a/python/ctsm/crop_calendars/cropcal_figs_module.py b/python/ctsm/crop_calendars/cropcal_figs_module.py index d820460175..f26b5975d4 100644 --- a/python/ctsm/crop_calendars/cropcal_figs_module.py +++ b/python/ctsm/crop_calendars/cropcal_figs_module.py @@ -1,6 +1,7 @@ """ Functions for making crop calendar figures """ +# pylint: disable=abstract-class-instantiated import numpy as np diff --git a/python/ctsm/crop_calendars/generate_gdds_functions.py b/python/ctsm/crop_calendars/generate_gdds_functions.py index 14bd6b2e40..81c71e2a51 100644 --- a/python/ctsm/crop_calendars/generate_gdds_functions.py +++ b/python/ctsm/crop_calendars/generate_gdds_functions.py @@ -1,7 +1,7 @@ """ Functions to support generate_gdds.py """ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines,too-many-statements,abstract-class-instantiated import warnings import os import glob diff --git a/python/ctsm/lilac_build_ctsm.py b/python/ctsm/lilac_build_ctsm.py index d7b92517c5..c1350005a8 100644 --- a/python/ctsm/lilac_build_ctsm.py +++ b/python/ctsm/lilac_build_ctsm.py @@ -830,7 +830,7 @@ def _stage_runtime_inputs(build_dir, no_pnetcdf): shutil.copyfile( src=os.path.join( - path_to_ctsm_root(), "cime_config", "usermods_dirs", "lilac", "user_nl_ctsm" + path_to_ctsm_root(), "cime_config", "usermods_dirs", "clm", "lilac", "user_nl_ctsm" ), dst=os.path.join(build_dir, _RUNTIME_INPUTS_DIRNAME, "user_nl_ctsm"), ) diff --git a/python/ctsm/lilac_make_runtime_inputs.py b/python/ctsm/lilac_make_runtime_inputs.py index e751f6c931..623cb3524d 100644 --- a/python/ctsm/lilac_make_runtime_inputs.py +++ b/python/ctsm/lilac_make_runtime_inputs.py @@ -28,7 +28,7 @@ -Specifies ctsm physics +Specifies ctsm physics """ @@ -163,7 +163,7 @@ def buildnml(cime_path, rundir): "buildnml_input", "ctsm_phys", ctsm_cfg_path, - allowed_values=["clm4_5", "clm5_0", "clm5_1", "clm6_0"], + allowed_values=["clm4_5", "clm5_0", "clm6_0"], ) configuration = get_config_value( config, diff --git a/python/ctsm/run_sys_tests.py b/python/ctsm/run_sys_tests.py index 6afc43cd19..7d3ffe8444 100644 --- a/python/ctsm/run_sys_tests.py +++ b/python/ctsm/run_sys_tests.py @@ -8,6 +8,7 @@ from datetime import datetime from CIME.test_utils import get_tests_from_xml # pylint: disable=import-error +from CIME.test_utils import test_to_string # pylint: disable=import-error from CIME.cs_status_creator import create_cs_status # pylint: disable=import-error from ctsm.ctsm_logging import ( @@ -780,6 +781,11 @@ def _get_compilers_for_suite(suite_name, machine_name, running_ctsm_py_tests): raise RuntimeError( "No tests found for suite {} on machine {}".format(suite_name, machine_name) ) + if logger.getEffectiveLevel() <= logging.INFO: + logger.info("Tests:") + for test in test_data: + test_string = test_to_string(test).split(" ")[1] + logger.info(" %s", test_string) if not running_ctsm_py_tests: _check_py_env([t["testname"] for t in test_data]) _check_py_env([t["testmods"] for t in test_data if "testmods" in t.keys()]) diff --git a/python/ctsm/site_and_regional/modify_singlept_site_neon.py b/python/ctsm/site_and_regional/modify_singlept_site_neon.py index 5c28bd3582..d0a86a9e3c 100755 --- a/python/ctsm/site_and_regional/modify_singlept_site_neon.py +++ b/python/ctsm/site_and_regional/modify_singlept_site_neon.py @@ -60,7 +60,7 @@ # -- valid neon sites valid = glob.glob( - os.path.join(path_to_ctsm_root(), "cime_config", "usermods_dirs", "NEON", "[!d]*") + os.path.join(path_to_ctsm_root(), "cime_config", "usermods_dirs", "clm", "NEON", "[!d]*") ) valid_neon_sites = [x[-4:] for x in valid] # last 4 letters in each string diff --git a/python/ctsm/site_and_regional/neon_site.py b/python/ctsm/site_and_regional/neon_site.py index 70414d9e5c..73264719ae 100755 --- a/python/ctsm/site_and_regional/neon_site.py +++ b/python/ctsm/site_and_regional/neon_site.py @@ -45,7 +45,9 @@ def build_base_case( ): if user_mods_dirs is None: user_mods_dirs = [ - os.path.join(self.cesmroot, "cime_config", "usermods_dirs", "NEON", self.name) + os.path.join( + self.cesmroot, "cime_config", "usermods_dirs", "clm", "NEON", self.name + ) ] case_path = super().build_base_case(cesmroot, output_root, res, compset, user_mods_dirs) @@ -94,7 +96,7 @@ def run_case( name of experiment, default False """ user_mods_dirs = [ - os.path.join(self.cesmroot, "cime_config", "usermods_dirs", "NEON", self.name) + os.path.join(self.cesmroot, "cime_config", "usermods_dirs", "clm", "NEON", self.name) ] tower_type = "NEON" diff --git a/python/ctsm/site_and_regional/plumber2_usermods.py b/python/ctsm/site_and_regional/plumber2_usermods.py index d98899771b..aba6dfa336 100644 --- a/python/ctsm/site_and_regional/plumber2_usermods.py +++ b/python/ctsm/site_and_regional/plumber2_usermods.py @@ -24,7 +24,7 @@ def write_usermods( Write information to be added to user mods """ - site_dir = os.path.join("../../cime_config/usermods_dirs/PLUMBER2/", site) + site_dir = os.path.join("../../cime_config/usermods_dirs/clm/PLUMBER2/", site) if not os.path.isdir(site_dir): os.makedirs(site_dir, exist_ok=True) diff --git a/python/ctsm/site_and_regional/run_neon.py b/python/ctsm/site_and_regional/run_neon.py index 3acbf435b1..ac72554d46 100755 --- a/python/ctsm/site_and_regional/run_neon.py +++ b/python/ctsm/site_and_regional/run_neon.py @@ -177,7 +177,7 @@ def main(description): # The [!Fd]* portion means that we won't retrieve cases that start with: # F (FATES) or d (default). We should be aware of adding cases that start with these. valid_neon_sites = glob.glob( - os.path.join(cesmroot, "cime_config", "usermods_dirs", "NEON", "[!Fd]*") + os.path.join(cesmroot, "cime_config", "usermods_dirs", "clm", "NEON", "[!Fd]*") ) valid_neon_sites = sorted([v.split("/")[-1] for v in valid_neon_sites]) diff --git a/python/ctsm/site_and_regional/tower_site.py b/python/ctsm/site_and_regional/tower_site.py index 31c959cac7..2ff8999408 100644 --- a/python/ctsm/site_and_regional/tower_site.py +++ b/python/ctsm/site_and_regional/tower_site.py @@ -79,21 +79,50 @@ def build_base_case( Args: self: The NeonSite object - base_root (str): - root of the base_case CIME + cesmroot (str): + root of the CESM code to run + output_root (str): + root of the output directory to write to res (str): base_case resolution or gridname compset (str): base case compset + user_mods_dirs (str): + path to the user-mod-directory to use overwrite (bool) : Flag to overwrite the case if exists + setup_only (bool) : + Flag to only do the setup phase """ + # + # Error checking on the input + # + if not os.path.isdir(cesmroot): + abort("Input cesmroot directory does NOT exist: " + str(cesmroot)) + if not isinstance(res, str): + abort("Input res is NOT a string as expected: " + str(res)) + if not isinstance(compset, str): + abort("Input compset is NOT a string as expected: " + str(compset)) + if not isinstance(overwrite, bool): + abort("Input compset is NOT a boolean as expected: " + str(compset)) + if not isinstance(setup_only, bool): + abort("Input setup_only is NOT a boolean as expected: " + str(setup_only)) + if not isinstance(user_mods_dirs, list): + abort("Input user_mods_dirs is NOT a list as expected: " + str(user_mods_dirs)) + for dir in user_mods_dirs: + if not os.path.isdir(dir): + abort("Input user_mods_dirs directory does NOT exist: " + str(dir)) + print("---- building a base case -------") # pylint: disable=attribute-defined-outside-init self.base_case_root = output_root # pylint: enable=attribute-defined-outside-init if not output_root: output_root = os.getcwd() + + if not os.path.isdir(output_root): + abort("Input output_root directory does NOT exist: " + str(output_root)) + case_path = os.path.join(output_root, self.name) logger.info("base_case_name : %s", self.name) diff --git a/python/ctsm/subset_data.py b/python/ctsm/subset_data.py index d38aee1308..fb0ba925a9 100644 --- a/python/ctsm/subset_data.py +++ b/python/ctsm/subset_data.py @@ -743,7 +743,7 @@ def subset_region(args, file_dict: dict): print("\nFor running this regional case with the created user_mods : ") print( - "./create_newcase --case case --res CLM_USRDAT --compset I2000Clm51BgcCrop", + "./create_newcase --case case --res CLM_USRDAT --compset I2000Clm60BgcCrop", "--run-unsupported --user-mods-dirs ", args.user_mods_dir, "\n\n", diff --git a/python/ctsm/test/test_sys_modify_singlept_site_neon.py b/python/ctsm/test/test_sys_modify_singlept_site_neon.py index 76a78c3db5..ed7e52ed38 100755 --- a/python/ctsm/test/test_sys_modify_singlept_site_neon.py +++ b/python/ctsm/test/test_sys_modify_singlept_site_neon.py @@ -55,7 +55,7 @@ def test_modify_site(self): sys.argv = [ "modify_singlept_site_neon", "--neon_site", - path_to_ctsm_root() + "/ctsm/cime_config/usermods_dirs/NEON/ABBY", + path_to_ctsm_root() + "/ctsm/cime_config/usermods_dirs/clm/NEON/ABBY", ] # TODO: the above requires a full path instead of site name # because of how run_neon is configured. diff --git a/python/ctsm/test/test_unit_neon_arg_parse.py b/python/ctsm/test/test_unit_neon_arg_parse.py index 4a5b0b9e6c..141b41fbc7 100755 --- a/python/ctsm/test/test_unit_neon_arg_parse.py +++ b/python/ctsm/test/test_unit_neon_arg_parse.py @@ -60,7 +60,7 @@ def test_function(self): description = "" cesmroot = path_to_ctsm_root() valid_neon_sites = glob.glob( - os.path.join(cesmroot, "cime_config", "usermods_dirs", "NEON", "[!d]*") + os.path.join(cesmroot, "cime_config", "usermods_dirs", "clm", "NEON", "[!d]*") ) valid_neon_sites = sorted([v.split("/")[-1] for v in valid_neon_sites]) parsed_arguments = get_parser(sys.argv, description, valid_neon_sites) diff --git a/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py b/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py index 5de67adb12..fdf9466763 100755 --- a/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py +++ b/python/ctsm/toolchain/gen_mksurfdata_jobscript_multi.py @@ -23,6 +23,8 @@ "global-present", "global-present-low-res", "global-present-ultra-hi-res", + "global-hist-1850-f19", + "global-hist-1850-f45", "crop-tropics-present", "crop", "crop-global-present", @@ -242,6 +244,14 @@ def main(): "--start-year 2000 --end-year 2000 --nocrop --res", "ultra_hi_res_no_crop", ), + "global-hist-1850-f19": ( + "--start-year 1850 --end-year 2023 --nocrop --res", + "f19", + ), + "global-hist-1850-f45": ( + "--start-year 1850 --end-year 2023 --nocrop --res", + "f45", + ), "crop-tropics-present": ( "--start-year 2000 --end-year 2000 --res", "5x5_amazon", diff --git a/share b/share index 4b9dc4871a..a48ff8790a 160000 --- a/share +++ b/share @@ -1 +1 @@ -Subproject commit 4b9dc4871a259f00f35bb47708d876cb7dcdf75c +Subproject commit a48ff8790a21d3831873ed9f023a43c606a1ef03 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5b0f6c9b1b..70cf802e45 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,14 +3,20 @@ cmake_minimum_required(VERSION 2.8) list(APPEND CMAKE_MODULE_PATH ${CIME_CMAKE_MODULE_DIRECTORY}) include(CIME_initial_setup) -project(clm45_tests Fortran C) +#list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../tools/mksurfdata_esmf/cmake") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../share/cmake") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../component/cmeps/cmake") + +project(clm_tests Fortran C) include(CIME_utils) set(CLM_ROOT "..") -# This definition is needed to avoid having ESMF depend on mpi -add_definitions(-DHIDE_MPI) +# find needed external packages +# This is where ESMF could be asked for, but it's already included in the share build brought in below +# NetCDF is required -- because PIO and NetCDF are required by the standard default ESMF libraries +find_package(NetCDF 4.7.4 REQUIRED Fortran) # Add source directories from other share code (csm_share, etc.). This should be # done first, so that in case of name collisions, the CLM versions take @@ -18,7 +24,6 @@ add_definitions(-DHIDE_MPI) # wins). add_subdirectory(${CLM_ROOT}/share/src csm_share) add_subdirectory(${CLM_ROOT}/share/unit_test_stubs/util csm_share_stubs) -add_subdirectory(${CLM_ROOT}/share/src/esmf_wrf_timemgr esmf_wrf_timemgr) # Add files needed from CMEPS list ( APPEND drv_sources_needed @@ -53,43 +58,43 @@ foreach (sourcefile ${share_sources}) endif() endforeach() -# Remove shr_cal_mod from share_sources. -# -# shr_cal_mod depends on ESMF (or the lightweight esmf wrf timemgr, at -# least). Since CTSM doesn't currently use shr_cal_mod, we're avoiding -# the extra overhead of including esmf_wrf_timemgr sources in this -# build. -# -# TODO: like above, this should be moved into a general-purpose function -# in Sourcelist_utils. Then this block of code could be replaced with a -# single call, like: remove_source_file(${share_sources} -# "shr_cal_mod.F90") -foreach (sourcefile ${share_sources}) - string(REGEX MATCH "shr_cal_mod.F90" match_found ${sourcefile}) - if(match_found) - list(REMOVE_ITEM share_sources ${sourcefile}) - endif() -endforeach() +# Bring in PIO, jsut because it's needed for the default ESMF library and included in other submodules like share and cmeps +if (DEFINED PIO) + set(PIO_PATH ${PIO}) +else() + set(PIO_PATH $ENV{PIO}) +endif() # Build libraries containing stuff needed for the unit tests. # Eventually, these add_library calls should probably be distributed into the correct location, rather than being in this top-level CMakeLists.txt file. +# This line of bringing in the share library also brings in ESMF and PIO add_library(csm_share ${share_sources} ${drv_sources_needed}) declare_generated_dependencies(csm_share "${share_genf90_sources}") -add_library(esmf_wrf_timemgr ${esmf_wrf_timemgr_sources}) add_library(clm ${clm_sources}) declare_generated_dependencies(clm "${clm_genf90_sources}") -add_dependencies(esmf_wrf_timemgr csm_share) -add_dependencies(clm csm_share esmf_wrf_timemgr) +add_dependencies(clm csm_share esmf) # We need to look for header files here, in order to pick up shr_assert.h include_directories(${CLM_ROOT}/share/include) -# And we need to look for header files here, for some include files needed by -# the esmf_wrf_timemgr code -include_directories(${CLM_ROOT}/share/src/esmf_wrf_timemgr) + +# PIO2 library to the include and the linking step +add_compile_definitions(PIO2) + +add_library(pioc STATIC IMPORTED) +add_library(piof STATIC IMPORTED) +set_property(TARGET pioc PROPERTY IMPORTED_LOCATION $ENV{PIO}/lib/libpioc.so) +set_property(TARGET piof PROPERTY IMPORTED_LOCATION $ENV{PIO}/lib/libpiof.so) + # Tell cmake to look for libraries & mod files here, because this is where we built libraries include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories (${ESMF_F90COMPILEPATHS}) +include_directories ($ENV{PIO}/include) +include_directories (${NETCDF}/include) + +# Directories and libraries to include in the link step link_directories(${CMAKE_CURRENT_BINARY_DIR}) +link_libraries( pioc piof netcdf ) # Add the test directories # Note: it's possible that these could be added by each source directory that diff --git a/src/biogeochem/CNFUNMod.F90 b/src/biogeochem/CNFUNMod.F90 index a6614fe4b9..0af5efe580 100644 --- a/src/biogeochem/CNFUNMod.F90 +++ b/src/biogeochem/CNFUNMod.F90 @@ -26,7 +26,7 @@ module CNFUNMod use pftconMod , only : pftcon, npcropmin use decompMod , only : bounds_type use clm_varctl , only : use_nitrif_denitrif,use_flexiblecn - use CNSharedParamsMod , only : use_matrixcn + use CNSharedParamsMod , only : use_matrixcn use abortutils , only : endrun use CNVegstateType , only : cnveg_state_type use CNVegCarbonStateType , only : cnveg_carbonstate_type @@ -48,12 +48,18 @@ module CNFUNMod private ! ! !PUBLIC MEMBER FUNCTIONS: + public :: CNFUNReadNML ! Read in namelist variables public:: readParams ! Read in parameters needed for FUN public:: CNFUNInit ! FUN calculation initialization public:: CNFUN ! Run FUN + character(len=25) :: nfix_method ! choice of nfix parameterization + type, private :: params_type real(r8) :: ndays_off ! number of days to complete leaf offset + real(r8), allocatable :: nfix_tmin(:) ! A BNF parameter + real(r8), allocatable :: nfix_topt(:) ! A BNF parameter + real(r8), allocatable :: nfix_tmax(:) ! A BNF parameter end type params_type ! @@ -82,17 +88,73 @@ module CNFUNMod contains !-------------------------------------------------------------------- !--- + subroutine CNFUNReadNML(NLFilename) + ! + ! !DESCRIPTION: + ! Read in namelist variables + ! + ! !USES: + use fileutils , only : getavu, relavu, opnfil + use shr_nl_mod , only : shr_nl_find_group_name + use spmdMod , only : masterproc, mpicom + use shr_mpi_mod, only : shr_mpi_bcast + use clm_varctl , only : iulog + use spmdMod , only : MPI_CHARACTER + ! + ! !ARGUMENTS: + character(len=*), intent(in) :: NLFilename ! Namelist filename + ! + ! !LOCAL VARIABLES: + integer :: ierr ! error code + integer :: unitn ! unit for namelist file + + character(len=*), parameter :: nmlname = 'cnfun_inparm' + !----------------------------------------------------------------------- + + namelist /cnfun_inparm/ nfix_method + + ! Initialize options to default values, in case they are not specified in + ! the namelist + + if (masterproc) then + unitn = getavu() + write(iulog,*) 'Read in '//nmlname//' namelist' + call opnfil (NLFilename, unitn, 'F') + call shr_nl_find_group_name(unitn, nmlname, status=ierr) + if (ierr == 0) then + read(unitn, nml=cnfun_inparm, iostat=ierr) + if (ierr /= 0) then + call endrun(msg="ERROR reading "//nmlname//"namelist"//errmsg(sourcefile, __LINE__)) + end if + else + call endrun(msg="ERROR finding "//nmlname//"namelist"//errmsg(sourcefile, __LINE__)) + end if + call relavu( unitn ) + end if + + call mpi_bcast (nfix_method, len(nfix_method), MPI_CHARACTER, 0, mpicom, ierr) + + if (masterproc) then + write(iulog,*) ' ' + write(iulog,*) nmlname//' settings:' + write(iulog,nml=cnfun_inparm) + write(iulog,*) ' ' + end if + + end subroutine CNFUNReadNML + + !----------------------------------------------------------------------- subroutine readParams ( ncid ) ! ! !USES: use ncdio_pio , only : file_desc_t,ncd_io + use clm_varpar, only : mxpft ! !ARGUMENTS: implicit none type(file_desc_t),intent(inout) :: ncid ! pio netCDF file id ! ! !LOCAL VARIABLES: - character(len=32) :: subname = 'CNFUNParamsType' character(len=100) :: errCode = '-Error reading in parameters file:' logical :: readv ! has variable been read in or not real(r8) :: tempr ! temporary to read in parameter @@ -107,6 +169,20 @@ subroutine readParams ( ncid ) if ( .not. readv ) call endrun( msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__)) params_inst%ndays_off=tempr + allocate(params_inst%nfix_tmin(0:mxpft)) + tString='nfix_tmin' + call ncd_io(trim(tString), params_inst%nfix_tmin(:), 'read', ncid, readvar=readv) + if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__)) + + allocate(params_inst%nfix_topt(0:mxpft)) + tString='nfix_topt' + call ncd_io(trim(tString), params_inst%nfix_topt(:), 'read', ncid, readvar=readv) + if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__)) + + allocate(params_inst%nfix_tmax(0:mxpft)) + tString='nfix_tmax' + call ncd_io(trim(tString), params_inst%nfix_tmax(:), 'read', ncid, readvar=readv) + if ( .not. readv ) call endrun(msg=trim(errCode)//trim(tString)//errMsg(sourcefile, __LINE__)) end subroutine readParams @@ -135,7 +211,6 @@ subroutine CNFUNInit (bounds,cnveg_state_inst,cnveg_carbonstate_inst,cnveg_nitro integer :: nstep ! time step number integer :: nstep_fun ! Number of ! atmospheric timesteps between calls to FUN - character(len=32) :: subname = 'CNFUNInit' !-------------------------------------------------------------------- !--- @@ -290,7 +365,7 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp& real(r8) :: litterfall_n(bounds%begp:bounds%endp) ! N loss based on the leafc to litter (gN/m2) real(r8) :: litterfall_n_step(bounds%begp:bounds%endp,1:nstp) ! N loss based on the leafc to litter (gN/m2) real(r8) :: litterfall_c_step(bounds%begp:bounds%endp,1:nstp) ! N loss based on the leafc to litter (gN/m2) - real(r8) :: tc_soisno(bounds%begc:bounds%endc,1:nlevdecomp) ! Soil temperature (degrees Celsius) + real(r8) :: tc_soisno(bounds%begc:bounds%endc,1:nlevdecomp) ! Soil temperature (degrees Celsius) real(r8) :: npp_remaining(bounds%begp:bounds%endp,1:nstp) ! A temporary variable for npp_remaining(gC/m2) real(r8) :: n_passive_step(bounds%begp:bounds%endp,1:nstp) ! N taken up by transpiration at substep(gN/m2) real(r8) :: n_passive_acc(bounds%begp:bounds%endp) ! N acquired by passive uptake (gN/m2) @@ -460,14 +535,13 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp& real(r8) :: total_N_resistance ! C to of N for whole soil -leaf ! pathway real(r8) :: free_RT_frac=0.0_r8 !fraction of N retranslocation which is automatic/free. - ! SHould be made into a PFT parameter. + ! Should be made into a PFT parameter. real(r8) :: paid_for_n_retrans real(r8) :: free_n_retrans real(r8) :: total_c_spent_retrans real(r8) :: total_c_accounted_retrans - !------end of not_use_nitrif_denitrif------! !-------------------------------------------------------------------- !------------ @@ -495,9 +569,10 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp& ! fixers, 2 for non fixers. This will become redundant with the ! 'fixer' parameter if it works. + character(len=100) :: errCode !-------------------------------------------------------------------- !--------------------------------- - associate(ivt => patch%itype , & ! Input: [integer (:) ] p + associate(ivt => patch%itype , & ! Input: [integer (:) ] p leafcn => pftcon%leafcn , & ! Input: leaf C:N (gC/gN) season_decid => pftcon%season_decid , & ! Input: binary flag for seasonal ! -deciduous leaf habit (0 or 1) @@ -522,10 +597,10 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp& perecm => pftcon%perecm , & ! Input: The fraction of ECM ! -associated PFT grperc => pftcon%grperc , & ! Input: growth percentage - fun_cn_flex_a => pftcon%fun_cn_flex_a , & ! Parameter a of FUN-flexcn link code (def 5) - fun_cn_flex_b => pftcon%fun_cn_flex_b , & ! Parameter b of FUN-flexcn link code (def 200) - fun_cn_flex_c => pftcon%fun_cn_flex_c , & ! Parameter b of FUN-flexcn link code (def 80) - FUN_fracfixers => pftcon%FUN_fracfixers , & ! Fraction of C that can be used for fixation. + fun_cn_flex_a => pftcon%fun_cn_flex_a , & ! Parameter a of FUN-flexcn link code (def 5) + fun_cn_flex_b => pftcon%fun_cn_flex_b , & ! Parameter b of FUN-flexcn link code (def 200) + fun_cn_flex_c => pftcon%fun_cn_flex_c , & ! Parameter b of FUN-flexcn link code (def 80) + FUN_fracfixers => pftcon%FUN_fracfixers , & ! Fraction of C that can be used for fixation. leafcn_offset => cnveg_state_inst%leafcn_offset_patch , & ! Output: ! [real(r8) (:)] Leaf C:N used by FUN plantCN => cnveg_state_inst%plantCN_patch , & ! Output: [real(r8) (:)] Plant @@ -1041,9 +1116,7 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp& npp_to_nonmyc_nh4(:) = 0.0_r8 npp_to_fixation(:) = 0.0_r8 npp_to_retrans(:) = 0.0_r8 - - - + unmetDemand = .TRUE. plant_ndemand_pool_step(p,istp) = plant_ndemand_pool(p) * permyc(p,istp) npp_remaining(p,istp) = availc_pool(p) * permyc(p,istp) @@ -1051,32 +1124,42 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp& ! if (plant_ndemand_pool_step(p,istp) .gt. 0._r8) then ! ! plant_ndemand_pool_step > 0.0 - + do j = 1, nlevdecomp tc_soisno(c,j) = t_soisno(c,j) - tfrz + if(pftcon%c3psn(patch%itype(p)).eq.1)then fixer=1 else fixer=0 endif - costNit(j,icostFix) = fun_cost_fix(fixer,a_fix(ivt(p)),b_fix(ivt(p))& - ,c_fix(ivt(p)) ,big_cost,crootfr(p,j),s_fix(ivt(p)),tc_soisno(c,j)) + + select case (nfix_method) + case ('Houlton') + costNit(j,icostFix) = fun_cost_fix(fixer, & + a_fix(ivt(p)), b_fix(ivt(p)), c_fix(ivt(p)), & + big_cost, crootfr(p,j), s_fix(ivt(p)), tc_soisno(c,j)) + case ('Bytnerowicz') ! no acclimation calculation + costNit(j,icostFix) = fun_cost_fix_Bytnerowicz_noAcc(fixer, & + params_inst%nfix_tmin(ivt(p)), params_inst%nfix_topt(ivt(p)), params_inst%nfix_tmax(ivt(p)), & + big_cost,crootfr(p,j), s_fix(ivt(p)), tc_soisno(c,j)) + case default + errCode = ' ERROR: unknown nfix_method value: ' // nfix_method + call endrun( msg=trim(errCode) // errMsg(sourcefile, __LINE__)) + end select + end do cost_fix(p,1:nlevdecomp) = costNit(:,icostFix) !-------------------------------------------------------------------- - !------------ ! If passive uptake is insufficient, consider fixation, ! mycorrhizal ! non-mycorrhizal, storage, and retranslocation. !-------------------------------------------------------------------- - !------------ !-------------------------------------------------------------------- - !------------ ! Costs of active uptake. !-------------------------------------------------------------------- - !------------ !------Mycorrhizal Uptake Cost-----------------! do j = 1,nlevdecomp rootc_dens_step = rootc_dens(p,j) * permyc(p,istp) @@ -1608,6 +1691,44 @@ real(r8) function fun_cost_fix(fixer,a_fix,b_fix,c_fix,big_cost,crootfr,s_fix, t end if ! ends up with the fixer or non-fixer decision end function fun_cost_fix + + +!========================================================================================= + real(r8) function fun_cost_fix_Bytnerowicz_noAcc(fixer,nfix_tmin,nfix_topt,nfix_tmax,big_cost,crootfr,s_fix, tc_soisno) + +! Description: +! Calculate the cost of fixing N by nodules. +! Code Description: +! This code is written to CTSM5.1 by Will Wieder 11/17/2022, modified for CLM6 11/01/2024 + + implicit none +!-------------------------------------------------------------------------- +! Function result. +!-------------------------------------------------------------------------- +! real(r8) , intent(out) :: cost_of_n !!! cost of fixing N (kgC/kgN) +!-------------------------------------------------------------------------- + integer, intent(in) :: fixer ! flag indicating if plant is a fixer + ! 1=yes, otherwise no. + real(r8), intent(in) :: nfix_tmin ! As in Bytnerowicz et al. (2022) + real(r8), intent(in) :: nfix_topt ! As in Bytnerowicz et al. (2022) + real(r8), intent(in) :: nfix_tmax ! As in Bytnerowicz et al. (2022) + real(r8), intent(in) :: big_cost ! an arbitrary large cost (gC/gN) + real(r8), intent(in) :: crootfr ! fraction of roots for carbon that are in this layer + real(r8), intent(in) :: s_fix ! Inverts the temperature function for a cost function + real(r8), intent(in) :: tc_soisno ! soil temperature (degrees Celsius) + + if (fixer == 1 .and. crootfr > 1.e-6_r8 .and. tc_soisno > nfix_tmin .and. tc_soisno < nfix_tmax) then + fun_cost_fix_Bytnerowicz_noAcc = (-s_fix) / ( ((nfix_tmax-tc_soisno)/(nfix_tmax-nfix_topt))*& + ( ((tc_soisno-nfix_tmin)/(nfix_topt-nfix_tmin))**& + ((nfix_topt- nfix_tmin)/(nfix_tmax-nfix_topt)) ) ) + fun_cost_fix_Bytnerowicz_noAcc = min(fun_cost_fix_Bytnerowicz_noAcc,big_cost) + else + fun_cost_fix_Bytnerowicz_noAcc = big_cost + end if ! ends up with the fixer or non-fixer decision + + end function fun_cost_fix_Bytnerowicz_noAcc +!========================================================================================= + !========================================================================================= real(r8) function fun_cost_active(sminn_layer,big_cost,kc_active,kn_active,rootc_dens,crootfr,smallValue) diff --git a/src/biogeochem/test/CNPhenology_test/CMakeLists.txt b/src/biogeochem/test/CNPhenology_test/CMakeLists.txt index 2367c86612..283e089ba6 100644 --- a/src/biogeochem/test/CNPhenology_test/CMakeLists.txt +++ b/src/biogeochem/test/CNPhenology_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(CNPhenology TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeochem/test/CNVegComputeSeed_test/CMakeLists.txt b/src/biogeochem/test/CNVegComputeSeed_test/CMakeLists.txt index dd6bdba723..b958439031 100644 --- a/src/biogeochem/test/CNVegComputeSeed_test/CMakeLists.txt +++ b/src/biogeochem/test/CNVegComputeSeed_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(CNVegComputeSeed TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeochem/test/DustEmis_test/CMakeLists.txt b/src/biogeochem/test/DustEmis_test/CMakeLists.txt index c705d6c2e3..d312b721b9 100644 --- a/src/biogeochem/test/DustEmis_test/CMakeLists.txt +++ b/src/biogeochem/test/DustEmis_test/CMakeLists.txt @@ -5,4 +5,4 @@ set (pfunit_sources add_pfunit_ctest(DustEmis TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeochem/test/Latbaset_test/CMakeLists.txt b/src/biogeochem/test/Latbaset_test/CMakeLists.txt index 217fc7233c..d9f1c044f3 100644 --- a/src/biogeochem/test/Latbaset_test/CMakeLists.txt +++ b/src/biogeochem/test/Latbaset_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(CropTypeLatbaset TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/SurfaceAlbedoType.F90 b/src/biogeophys/SurfaceAlbedoType.F90 index e90caeecbb..10819a47b6 100644 --- a/src/biogeophys/SurfaceAlbedoType.F90 +++ b/src/biogeophys/SurfaceAlbedoType.F90 @@ -242,12 +242,12 @@ subroutine InitHistory(this, bounds) this%albgrd_col(begc:endc,:) = spval call hist_addfld2d (fname='ALBGRD', units='proportion', type2d='numrad', & avgflag='A', long_name='ground albedo (direct)', & - ptr_col=this%albgrd_col, default='inactive') + ptr_col=this%albgrd_col, default='active') this%albgri_col(begc:endc,:) = spval call hist_addfld2d (fname='ALBGRI', units='proportion', type2d='numrad', & avgflag='A', long_name='ground albedo (indirect)', & - ptr_col=this%albgri_col, default='inactive') + ptr_col=this%albgri_col, default='active') if (use_SSRE) then this%albdSF_patch(begp:endp,:) = spval diff --git a/src/biogeophys/UrbanAlbedoMod.F90 b/src/biogeophys/UrbanAlbedoMod.F90 index 2e854a0497..3e84f73176 100644 --- a/src/biogeophys/UrbanAlbedoMod.F90 +++ b/src/biogeophys/UrbanAlbedoMod.F90 @@ -78,9 +78,14 @@ subroutine UrbanAlbedo (bounds, num_urbanl, filter_urbanl, & type(surfalb_type) , intent(inout) :: surfalb_inst ! ! !LOCAL VARIABLES: - integer :: fl,fp,fc,g,l,p,c,ib ! indices + integer :: fl,fp,fc,g,l,p,c,ib,f,fn ! indices and counters integer :: ic ! 0=unit incoming direct; 1=unit incoming diffuse - integer :: num_solar ! counter + integer, allocatable :: filter_urbanl_coszen_gt0(:) ! filter for urban landunits with coszen > 0 + integer :: num_urbanl_coszen_gt0 ! number of urban landunits with coszen > 0 + integer, allocatable :: filter_nourbanl_coszen_gt0(:) ! filter for urban landunits with coszen <= 0 + integer :: num_nourbanl_coszen_gt0 ! number of urban landunits with coszen <= 0 + integer, allocatable :: filter_urbanc_coszen_gt0(:) ! filter for urban columns with coszen > 0 + integer :: num_urbanc_coszen_gt0 ! number of urban columns with coszen > 0 real(r8) :: coszen (bounds%begl:bounds%endl) ! cosine solar zenith angle for next time step (landunit) real(r8) :: zen (bounds%begl:bounds%endl) ! solar zenith angle (radians) real(r8) :: sdir (bounds%begl:bounds%endl, numrad) ! direct beam solar radiation on horizontal surface @@ -165,9 +170,16 @@ subroutine UrbanAlbedo (bounds, num_urbanl, filter_urbanl, & begl => bounds%begl , & vf_sr => urbanparams_inst%vf_sr , & ! Input: [real(r8) (:) ] view factor of sky for road vf_sw => urbanparams_inst%vf_sw , & ! Input: [real(r8) (:) ] view factor of sky for one wall - endl => bounds%endl & + endl => bounds%endl , & + begc => bounds%begc , & + endc => bounds%endc & ) + ! Allocate urbanl and urbanc coszen filters + allocate(filter_urbanl_coszen_gt0(bounds%endl-bounds%begl+1)) + allocate(filter_nourbanl_coszen_gt0(bounds%endl-bounds%begl+1)) + allocate(filter_urbanc_coszen_gt0(bounds%endc-bounds%begc+1)) + ! ---------------------------------------------------------------------------- ! Solar declination and cosine solar zenith angle and zenith angle for ! next time step @@ -228,15 +240,36 @@ subroutine UrbanAlbedo (bounds, num_urbanl, filter_urbanl, & end do end do - ! ---------------------------------------------------------------------------- - ! Urban Code - ! ---------------------------------------------------------------------------- - - num_solar = 0 + ! Populate urbanl and urbanc coszen filters + f = 0 + fn = 0 do fl = 1,num_urbanl l = filter_urbanl(fl) - if (coszen(l) > 0._r8) num_solar = num_solar + 1 + if (coszen(l) > 0._r8) then + f = f + 1 + filter_urbanl_coszen_gt0(f) = l + else + fn = fn + 1 + filter_nourbanl_coszen_gt0(fn) = l + end if + end do + num_urbanl_coszen_gt0 = f + num_nourbanl_coszen_gt0 = fn + + f = 0 + do fc = 1,num_urbanc + c = filter_urbanc(fc) + l = col%landunit(c) + if (coszen(l) > 0._r8) then + f = f + 1 + filter_urbanc_coszen_gt0(f) = c + end if end do + num_urbanc_coszen_gt0 = f + + ! ---------------------------------------------------------------------------- + ! Urban Code + ! ---------------------------------------------------------------------------- do ib = 1,numrad do fl = 1,num_urbanl @@ -267,184 +300,183 @@ subroutine UrbanAlbedo (bounds, num_urbanl, filter_urbanl, & end do ! ---------------------------------------------------------------------------- - ! Only do the rest if all coszen are positive + ! Use the urban coszen filters to only calculate quantities when coszen > 0 ! ---------------------------------------------------------------------------- - if (num_solar > 0)then - ! Set constants - solar fluxes are per unit incoming flux + ! Set constants - solar fluxes are per unit incoming flux - do ib = 1,numrad - do fl = 1,num_urbanl - l = filter_urbanl(fl) - sdir(l,ib) = 1._r8 - sdif(l,ib) = 1._r8 - end do + do ib = 1,numrad + do fl = 1,num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) + sdir(l,ib) = 1._r8 + sdif(l,ib) = 1._r8 end do + end do - ! Incident direct beam radiation for - ! (a) roof and (b) road and both walls in urban canyon - - if (num_urbanl > 0) then - call incident_direct (bounds, & - num_urbanl, filter_urbanl, & - canyon_hwr(begl:endl), & - coszen(begl:endl), & - zen(begl:endl), & - sdir(begl:endl, :), & - sdir_road(begl:endl, :), & - sdir_sunwall(begl:endl, :), & - sdir_shadewall(begl:endl, :)) - end if + ! Incident direct beam radiation for + ! (a) roof and (b) road and both walls in urban canyon + + if (num_urbanl > 0) then + call incident_direct (bounds, & + num_urbanl_coszen_gt0, & + filter_urbanl_coszen_gt0, & + num_nourbanl_coszen_gt0, & + filter_nourbanl_coszen_gt0, & + canyon_hwr(begl:endl), & + zen(begl:endl), & + sdir(begl:endl, :), & + sdir_road(begl:endl, :), & + sdir_sunwall(begl:endl, :), & + sdir_shadewall(begl:endl, :)) + end if - ! Incident diffuse radiation for - ! (a) roof and (b) road and both walls in urban canyon. - - if (num_urbanl > 0) then - call incident_diffuse (bounds, & - num_urbanl, filter_urbanl, & - canyon_hwr(begl:endl), & - sdif(begl:endl, :), & - sdif_road(begl:endl, :), & - sdif_sunwall(begl:endl, :), & - sdif_shadewall(begl:endl, :), & - urbanparams_inst) - end if + ! Incident diffuse radiation for + ! (a) roof and (b) road and both walls in urban canyon. + + if (num_urbanl_coszen_gt0 > 0) then + call incident_diffuse (bounds, & + num_urbanl_coszen_gt0, & + filter_urbanl_coszen_gt0, & + canyon_hwr(begl:endl), & + sdif(begl:endl, :), & + sdif_road(begl:endl, :), & + sdif_sunwall(begl:endl, :), & + sdif_shadewall(begl:endl, :), & + urbanparams_inst) + end if - ! Get snow albedos for roof and impervious and pervious road - if (num_urbanl > 0) then - ic = 0 - call SnowAlbedo(bounds, & - num_urbanc, filter_urbanc, & - coszen(begl:endl), & - ic, & - albsnd_roof(begl:endl, :), & - albsnd_improad(begl:endl, :), & - albsnd_perroad(begl:endl, :), & - waterstatebulk_inst) - - ic = 1 - call SnowAlbedo(bounds, & - num_urbanc, filter_urbanc, & - coszen(begl:endl), & - ic, & - albsni_roof(begl:endl, :), & - albsni_improad(begl:endl, :), & - albsni_perroad(begl:endl, :), & - waterstatebulk_inst) - end if + ! Get snow albedos for roof and impervious and pervious road + if (num_urbanl > 0) then + ic = 0 + call SnowAlbedo(bounds, & + num_urbanc, filter_urbanc, & + num_urbanc_coszen_gt0, & + filter_urbanc_coszen_gt0, & + ic, & + albsnd_roof(begl:endl, :), & + albsnd_improad(begl:endl, :), & + albsnd_perroad(begl:endl, :), & + waterstatebulk_inst) + + ic = 1 + call SnowAlbedo(bounds, & + num_urbanc, filter_urbanc, & + num_urbanc_coszen_gt0, & + filter_urbanc_coszen_gt0, & + ic, & + albsni_roof(begl:endl, :), & + albsni_improad(begl:endl, :), & + albsni_perroad(begl:endl, :), & + waterstatebulk_inst) + end if - ! Combine snow-free and snow albedos - do ib = 1,numrad - do fc = 1,num_urbanc - c = filter_urbanc(fc) - l = col%landunit(c) - if (ctype(c) == icol_roof) then - alb_roof_dir_s(l,ib) = alb_roof_dir(l,ib)*(1._r8-frac_sno(c)) & - + albsnd_roof(l,ib)*frac_sno(c) - alb_roof_dif_s(l,ib) = alb_roof_dif(l,ib)*(1._r8-frac_sno(c)) & - + albsni_roof(l,ib)*frac_sno(c) - else if (ctype(c) == icol_road_imperv) then - alb_improad_dir_s(l,ib) = alb_improad_dir(l,ib)*(1._r8-frac_sno(c)) & - + albsnd_improad(l,ib)*frac_sno(c) - alb_improad_dif_s(l,ib) = alb_improad_dif(l,ib)*(1._r8-frac_sno(c)) & - + albsni_improad(l,ib)*frac_sno(c) - else if (ctype(c) == icol_road_perv) then - alb_perroad_dir_s(l,ib) = alb_perroad_dir(l,ib)*(1._r8-frac_sno(c)) & - + albsnd_perroad(l,ib)*frac_sno(c) - alb_perroad_dif_s(l,ib) = alb_perroad_dif(l,ib)*(1._r8-frac_sno(c)) & - + albsni_perroad(l,ib)*frac_sno(c) - end if - end do + ! Combine snow-free and snow albedos + do ib = 1,numrad + do fc = 1,num_urbanc_coszen_gt0 + c = filter_urbanc_coszen_gt0(fc) + l = col%landunit(c) + if (ctype(c) == icol_roof) then + alb_roof_dir_s(l,ib) = alb_roof_dir(l,ib)*(1._r8-frac_sno(c)) & + + albsnd_roof(l,ib)*frac_sno(c) + alb_roof_dif_s(l,ib) = alb_roof_dif(l,ib)*(1._r8-frac_sno(c)) & + + albsni_roof(l,ib)*frac_sno(c) + else if (ctype(c) == icol_road_imperv) then + alb_improad_dir_s(l,ib) = alb_improad_dir(l,ib)*(1._r8-frac_sno(c)) & + + albsnd_improad(l,ib)*frac_sno(c) + alb_improad_dif_s(l,ib) = alb_improad_dif(l,ib)*(1._r8-frac_sno(c)) & + + albsni_improad(l,ib)*frac_sno(c) + else if (ctype(c) == icol_road_perv) then + alb_perroad_dir_s(l,ib) = alb_perroad_dir(l,ib)*(1._r8-frac_sno(c)) & + + albsnd_perroad(l,ib)*frac_sno(c) + alb_perroad_dif_s(l,ib) = alb_perroad_dif(l,ib)*(1._r8-frac_sno(c)) & + + albsni_perroad(l,ib)*frac_sno(c) + end if end do + end do - ! Reflected and absorbed solar radiation per unit incident radiation - ! for road and both walls in urban canyon allowing for multiple reflection - ! Reflected and absorbed solar radiation per unit incident radiation for roof + ! Reflected and absorbed solar radiation per unit incident radiation + ! for road and both walls in urban canyon allowing for multiple reflection + ! Reflected and absorbed solar radiation per unit incident radiation for roof + + if (num_urbanl_coszen_gt0 > 0) then + call net_solar (bounds, & + num_urbanl_coszen_gt0, & + filter_urbanl_coszen_gt0, & + canyon_hwr (begl:endl), & + wtroad_perv (begl:endl), & + sdir (begl:endl, :), & + sdif (begl:endl, :), & + alb_improad_dir_s (begl:endl, :), & + alb_perroad_dir_s (begl:endl, :), & + alb_wall_dir (begl:endl, :), & + alb_roof_dir_s (begl:endl, :), & + alb_improad_dif_s (begl:endl, :), & + alb_perroad_dif_s (begl:endl, :), & + alb_wall_dif (begl:endl, :), & + alb_roof_dif_s (begl:endl, :), & + sdir_road (begl:endl, :), & + sdir_sunwall (begl:endl, :), & + sdir_shadewall (begl:endl, :), & + sdif_road (begl:endl, :), & + sdif_sunwall (begl:endl, :), & + sdif_shadewall (begl:endl, :), & + sref_improad_dir (begl:endl, :), & + sref_perroad_dir (begl:endl, :), & + sref_sunwall_dir (begl:endl, :), & + sref_shadewall_dir (begl:endl, :), & + sref_roof_dir (begl:endl, :), & + sref_improad_dif (begl:endl, :), & + sref_perroad_dif (begl:endl, :), & + sref_sunwall_dif (begl:endl, :), & + sref_shadewall_dif (begl:endl, :), & + sref_roof_dif (begl:endl, :), & + urbanparams_inst, solarabs_inst) + end if - if (num_urbanl > 0) then - call net_solar (bounds, & - num_urbanl, filter_urbanl, & - coszen (begl:endl), & - canyon_hwr (begl:endl), & - wtroad_perv (begl:endl), & - sdir (begl:endl, :), & - sdif (begl:endl, :), & - alb_improad_dir_s (begl:endl, :), & - alb_perroad_dir_s (begl:endl, :), & - alb_wall_dir (begl:endl, :), & - alb_roof_dir_s (begl:endl, :), & - alb_improad_dif_s (begl:endl, :), & - alb_perroad_dif_s (begl:endl, :), & - alb_wall_dif (begl:endl, :), & - alb_roof_dif_s (begl:endl, :), & - sdir_road (begl:endl, :), & - sdir_sunwall (begl:endl, :), & - sdir_shadewall (begl:endl, :), & - sdif_road (begl:endl, :), & - sdif_sunwall (begl:endl, :), & - sdif_shadewall (begl:endl, :), & - sref_improad_dir (begl:endl, :), & - sref_perroad_dir (begl:endl, :), & - sref_sunwall_dir (begl:endl, :), & - sref_shadewall_dir (begl:endl, :), & - sref_roof_dir (begl:endl, :), & - sref_improad_dif (begl:endl, :), & - sref_perroad_dif (begl:endl, :), & - sref_sunwall_dif (begl:endl, :), & - sref_shadewall_dif (begl:endl, :), & - sref_roof_dif (begl:endl, :), & - urbanparams_inst, solarabs_inst) - end if + ! ---------------------------------------------------------------------------- + ! Map urban output to surfalb_inst components + ! ---------------------------------------------------------------------------- - ! ---------------------------------------------------------------------------- - ! Map urban output to surfalb_inst components - ! ---------------------------------------------------------------------------- - - ! Set albgrd and albgri (ground albedos) and albd and albi (surface albedos) - - do ib = 1,numrad - do fc = 1,num_urbanc - c = filter_urbanc(fc) - l = col%landunit(c) - if (ctype(c) == icol_roof) then - albgrd(c,ib) = sref_roof_dir(l,ib) - albgri(c,ib) = sref_roof_dif(l,ib) - else if (ctype(c) == icol_sunwall) then - albgrd(c,ib) = sref_sunwall_dir(l,ib) - albgri(c,ib) = sref_sunwall_dif(l,ib) - else if (ctype(c) == icol_shadewall) then - albgrd(c,ib) = sref_shadewall_dir(l,ib) - albgri(c,ib) = sref_shadewall_dif(l,ib) - else if (ctype(c) == icol_road_perv) then - albgrd(c,ib) = sref_perroad_dir(l,ib) - albgri(c,ib) = sref_perroad_dif(l,ib) - else if (ctype(c) == icol_road_imperv) then - albgrd(c,ib) = sref_improad_dir(l,ib) - albgri(c,ib) = sref_improad_dif(l,ib) - endif -! add new snicar albedo variables for history fields - if (coszen(l) > 0._r8) then - albgrd_hst(c,ib) = albgrd(c,ib) - albgri_hst(c,ib) = albgri(c,ib) - end if -! end add new snicar - end do - do fp = 1,num_urbanp - p = filter_urbanp(fp) - c = patch%column(p) - l = patch%landunit(p) - albd(p,ib) = albgrd(c,ib) - albi(p,ib) = albgri(c,ib) -! add new snicar albedo variables for history fields - if (coszen(l) > 0._r8) then - albd_hst(p,ib) = albd(p,ib) - albi_hst(p,ib) = albi(p,ib) - end if -! end add new snicar - end do + ! Set albgrd and albgri (ground albedos) and albd and albi (surface albedos) + + do ib = 1,numrad + do fc = 1,num_urbanc + c = filter_urbanc(fc) + l = col%landunit(c) + if (ctype(c) == icol_roof) then + albgrd(c,ib) = sref_roof_dir(l,ib) + albgri(c,ib) = sref_roof_dif(l,ib) + else if (ctype(c) == icol_sunwall) then + albgrd(c,ib) = sref_sunwall_dir(l,ib) + albgri(c,ib) = sref_sunwall_dif(l,ib) + else if (ctype(c) == icol_shadewall) then + albgrd(c,ib) = sref_shadewall_dir(l,ib) + albgri(c,ib) = sref_shadewall_dif(l,ib) + else if (ctype(c) == icol_road_perv) then + albgrd(c,ib) = sref_perroad_dir(l,ib) + albgri(c,ib) = sref_perroad_dif(l,ib) + else if (ctype(c) == icol_road_imperv) then + albgrd(c,ib) = sref_improad_dir(l,ib) + albgri(c,ib) = sref_improad_dif(l,ib) + endif + if (coszen(l) > 0._r8) then + albgrd_hst(c,ib) = albgrd(c,ib) + albgri_hst(c,ib) = albgri(c,ib) + end if end do - end if + do fp = 1,num_urbanp + p = filter_urbanp(fp) + c = patch%column(p) + l = patch%landunit(p) + albd(p,ib) = albgrd(c,ib) + albi(p,ib) = albgri(c,ib) + if (coszen(l) > 0._r8) then + albd_hst(p,ib) = albd(p,ib) + albi_hst(p,ib) = albi(p,ib) + end if + end do + end do end associate @@ -452,7 +484,7 @@ end subroutine UrbanAlbedo !----------------------------------------------------------------------- subroutine SnowAlbedo (bounds , & - num_urbanc, filter_urbanc, coszen, ind , & + num_urbanc, filter_urbanc, num_urbanc_coszen_gt0, filter_urbanc_coszen_gt0, ind , & albsn_roof, albsn_improad, albsn_perroad, & waterstatebulk_inst) ! @@ -466,8 +498,9 @@ subroutine SnowAlbedo (bounds , & type(bounds_type), intent(in) :: bounds integer , intent(in) :: num_urbanc ! number of urban columns in clump integer , intent(in) :: filter_urbanc(:) ! urban column filter + integer , intent(in) :: num_urbanc_coszen_gt0 ! number of urban columns with coszen > 0 + integer , intent(in) :: filter_urbanc_coszen_gt0(:) ! filter for urban columns with coszen > 0 integer , intent(in) :: ind ! 0=direct beam, 1=diffuse radiation - real(r8), intent(in) :: coszen ( bounds%begl: ) ! cosine solar zenith angle [landunit] real(r8), intent(out):: albsn_roof ( bounds%begl: , 1: ) ! roof snow albedo by waveband [landunit, numrad] real(r8), intent(out):: albsn_improad ( bounds%begl: , 1: ) ! impervious road snow albedo by waveband [landunit, numrad] real(r8), intent(out):: albsn_perroad ( bounds%begl: , 1: ) ! pervious road snow albedo by waveband [landunit, numrad] @@ -488,7 +521,6 @@ subroutine SnowAlbedo (bounds , & SHR_ASSERT_ALL_FL(numrad == 2, sourcefile, __LINE__) ! Enforce expected array sizes - SHR_ASSERT_ALL_FL((ubound(coszen) == (/bounds%endl/)), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(albsn_roof) == (/bounds%endl, numrad/)), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(albsn_improad) == (/bounds%endl, numrad/)), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(albsn_perroad) == (/bounds%endl, numrad/)), sourcefile, __LINE__) @@ -497,10 +529,10 @@ subroutine SnowAlbedo (bounds , & caller = 'UrbanAlbedoMod:SnowAlbedo', & h2osno_total = h2osno_total(bounds%begc:bounds%endc)) - do fc = 1,num_urbanc - c = filter_urbanc(fc) + do fc = 1,num_urbanc_coszen_gt0 + c = filter_urbanc_coszen_gt0(fc) l = col%landunit(c) - if (coszen(l) > 0._r8 .and. h2osno_total(c) > 0._r8) then + if (h2osno_total(c) > 0._r8) then if (col%itype(c) == icol_roof) then albsn_roof(l,1) = snal0 albsn_roof(l,2) = snal1 @@ -528,8 +560,9 @@ subroutine SnowAlbedo (bounds , & end subroutine SnowAlbedo !----------------------------------------------------------------------- - subroutine incident_direct (bounds , & - num_urbanl, filter_urbanl, canyon_hwr, coszen, zen , & + subroutine incident_direct (bounds, & + num_urbanl_coszen_gt0, filter_urbanl_coszen_gt0, & + num_nourbanl_coszen_gt0, filter_nourbanl_coszen_gt0, canyon_hwr, zen, & sdir, sdir_road, sdir_sunwall, sdir_shadewall) ! ! !DESCRIPTION: @@ -567,10 +600,11 @@ subroutine incident_direct (bounds , & ! ! !ARGUMENTS: type(bounds_type), intent(in) :: bounds - integer , intent(in) :: num_urbanl ! number of urban landunits - integer , intent(in) :: filter_urbanl(:) ! urban landunit filter + integer , intent(in) :: num_urbanl_coszen_gt0 ! number of urban landunits with coszen > 0 + integer , intent(in) :: filter_urbanl_coszen_gt0(:) ! filter for urban landunits with coszen > 0 + integer , intent(in) :: num_nourbanl_coszen_gt0 ! number of urban landunits with coszen <= 0 + integer , intent(in) :: filter_nourbanl_coszen_gt0(:) ! filter for urban landunits with coszen <= 0 real(r8), intent(in) :: canyon_hwr( bounds%begl: ) ! ratio of building height to street width [landunit] - real(r8), intent(in) :: coszen( bounds%begl: ) ! cosine solar zenith angle [landunit] real(r8), intent(in) :: zen( bounds%begl: ) ! solar zenith angle (radians) [landunit] real(r8), intent(in) :: sdir( bounds%begl: , 1: ) ! direct beam solar radiation incident on horizontal surface [landunit, numrad] real(r8), intent(out) :: sdir_road( bounds%begl: , 1: ) ! direct beam solar radiation incident on road per unit incident flux [landunit, numrad] @@ -595,54 +629,49 @@ subroutine incident_direct (bounds , & ! Enforce expected array sizes SHR_ASSERT_ALL_FL((ubound(canyon_hwr) == (/bounds%endl/)), sourcefile, __LINE__) - SHR_ASSERT_ALL_FL((ubound(coszen) == (/bounds%endl/)), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(zen) == (/bounds%endl/)), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(sdir) == (/bounds%endl, numrad/)), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(sdir_road) == (/bounds%endl, numrad/)), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(sdir_sunwall) == (/bounds%endl, numrad/)), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(sdir_shadewall) == (/bounds%endl, numrad/)), sourcefile, __LINE__) - do fl = 1,num_urbanl - l = filter_urbanl(fl) - if (coszen(l) > 0._r8) then - theta0(l) = asin(min( (1._r8/(canyon_hwr(l)*tan(max(zen(l),0.000001_r8)))), 1._r8 )) - tanzen(l) = tan(zen(l)) - end if + do fl = 1,num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) + theta0(l) = asin(min( (1._r8/(canyon_hwr(l)*tan(max(zen(l),0.000001_r8)))), 1._r8 )) + tanzen(l) = tan(zen(l)) end do do ib = 1,numrad - do fl = 1,num_urbanl - l = filter_urbanl(fl) - if (coszen(l) > 0._r8) then - sdir_shadewall(l,ib) = 0._r8 + do fl = 1,num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) + sdir_shadewall(l,ib) = 0._r8 - ! incident solar radiation on wall and road integrated over all canyon orientations (0 <= theta <= pi/2) + ! incident solar radiation on wall and road integrated over all canyon orientations (0 <= theta <= pi/2) - sdir_road(l,ib) = sdir(l,ib) * & - (2._r8*theta0(l)/rpi - 2./rpi*canyon_hwr(l)*tanzen(l)*(1._r8-cos(theta0(l)))) - sdir_sunwall(l,ib) = 2._r8 * sdir(l,ib) * ((1._r8/canyon_hwr(l))* & - (0.5_r8-theta0(l)/rpi) + (1._r8/rpi)*tanzen(l)*(1._r8-cos(theta0(l)))) + sdir_road(l,ib) = sdir(l,ib) * & + (2._r8*theta0(l)/rpi - 2./rpi*canyon_hwr(l)*tanzen(l)*(1._r8-cos(theta0(l)))) + sdir_sunwall(l,ib) = 2._r8 * sdir(l,ib) * ((1._r8/canyon_hwr(l))* & + (0.5_r8-theta0(l)/rpi) + (1._r8/rpi)*tanzen(l)*(1._r8-cos(theta0(l)))) - ! conservation check for road and wall. need to use wall fluxes converted to ground area + ! conservation check for road and wall. need to use wall fluxes converted to ground area - swall_projected = (sdir_shadewall(l,ib) + sdir_sunwall(l,ib)) * canyon_hwr(l) - err1(l) = sdir(l,ib) - (sdir_road(l,ib) + swall_projected) - else - sdir_road(l,ib) = 0._r8 - sdir_sunwall(l,ib) = 0._r8 - sdir_shadewall(l,ib) = 0._r8 - endif + swall_projected = (sdir_shadewall(l,ib) + sdir_sunwall(l,ib)) * canyon_hwr(l) + err1(l) = sdir(l,ib) - (sdir_road(l,ib) + swall_projected) + end do + do fl = 1,num_nourbanl_coszen_gt0 + l = filter_nourbanl_coszen_gt0(fl) + sdir_road(l,ib) = 0._r8 + sdir_sunwall(l,ib) = 0._r8 + sdir_shadewall(l,ib) = 0._r8 end do - do fl = 1,num_urbanl - l = filter_urbanl(fl) - if (coszen(l) > 0._r8) then - if (abs(err1(l)) > 0.001_r8) then - write (iulog,*) 'urban direct beam solar radiation balance error',err1(l) - write (iulog,*) 'clm model is stopping' - call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) - endif + do fl = 1,num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) + if (abs(err1(l)) > 0.001_r8) then + write (iulog,*) 'urban direct beam solar radiation balance error',err1(l) + write (iulog,*) 'clm model is stopping' + call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) endif end do @@ -650,41 +679,37 @@ subroutine incident_direct (bounds , & ! sum sroad and swall over all canyon orientations (0 <= theta <= pi/2) if (numchk) then - do fl = 1,num_urbanl - l = filter_urbanl(fl) - if (coszen(l) > 0._r8) then - sumr = 0._r8 - sumw = 0._r8 - num = 0._r8 - do i = 1, 9000 - theta = i/100._r8 * rpi/180._r8 - zen0 = atan(1._r8/(canyon_hwr(l)*sin(theta))) - if (zen(l) >= zen0) then - sumr = sumr + 0._r8 - sumw = sumw + sdir(l,ib) / canyon_hwr(l) - else - sumr = sumr + sdir(l,ib) * (1._r8-canyon_hwr(l)*sin(theta)*tanzen(l)) - sumw = sumw + sdir(l,ib) * sin(theta)*tanzen(l) - end if - num = num + 1._r8 - end do - err2(l) = sumr/num - sdir_road(l,ib) - err3(l) = sumw/num - sdir_sunwall(l,ib) - endif - end do - do fl = 1,num_urbanl - l = filter_urbanl(fl) - if (coszen(l) > 0._r8) then - if (abs(err2(l)) > 0.0006_r8 ) then - write (iulog,*) 'urban road incident direct beam solar radiation error',err2(l) - write (iulog,*) 'clm model is stopping' - call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) - endif - if (abs(err3(l)) > 0.0006_r8 ) then - write (iulog,*) 'urban wall incident direct beam solar radiation error',err3(l) - write (iulog,*) 'clm model is stopping' - call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) + do fl = 1,num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) + sumr = 0._r8 + sumw = 0._r8 + num = 0._r8 + do i = 1, 9000 + theta = i/100._r8 * rpi/180._r8 + zen0 = atan(1._r8/(canyon_hwr(l)*sin(theta))) + if (zen(l) >= zen0) then + sumr = sumr + 0._r8 + sumw = sumw + sdir(l,ib) / canyon_hwr(l) + else + sumr = sumr + sdir(l,ib) * (1._r8-canyon_hwr(l)*sin(theta)*tanzen(l)) + sumw = sumw + sdir(l,ib) * sin(theta)*tanzen(l) end if + num = num + 1._r8 + end do + err2(l) = sumr/num - sdir_road(l,ib) + err3(l) = sumw/num - sdir_sunwall(l,ib) + end do + do fl = 1,num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) + if (abs(err2(l)) > 0.0006_r8 ) then + write (iulog,*) 'urban road incident direct beam solar radiation error',err2(l) + write (iulog,*) 'clm model is stopping' + call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) + endif + if (abs(err3(l)) > 0.0006_r8 ) then + write (iulog,*) 'urban wall incident direct beam solar radiation error',err3(l) + write (iulog,*) 'clm model is stopping' + call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) end if end do end if @@ -695,7 +720,7 @@ end subroutine incident_direct !----------------------------------------------------------------------- subroutine incident_diffuse (bounds, & - num_urbanl, filter_urbanl, canyon_hwr, & + num_urbanl_coszen_gt0, filter_urbanl_coszen_gt0, canyon_hwr, & sdif, sdif_road, sdif_sunwall, sdif_shadewall, & urbanparams_inst) ! @@ -707,8 +732,8 @@ subroutine incident_diffuse (bounds, & ! ! !ARGUMENTS: type(bounds_type) , intent(in) :: bounds - integer , intent(in) :: num_urbanl ! number of urban landunits - integer , intent(in) :: filter_urbanl(:) ! urban landunit filter + integer , intent(in) :: num_urbanl_coszen_gt0 ! number of urban landunits with coszen > 0 + integer , intent(in) :: filter_urbanl_coszen_gt0(:) ! filter for urban landunits with coszen > 0 real(r8) , intent(in) :: canyon_hwr ( bounds%begl: ) ! ratio of building height to street width [landunit] real(r8) , intent(in) :: sdif ( bounds%begl: , 1: ) ! diffuse solar radiation incident on horizontal surface [landunit, numrad] real(r8) , intent(out) :: sdif_road ( bounds%begl: , 1: ) ! diffuse solar radiation incident on road [landunit, numrad] @@ -738,8 +763,8 @@ subroutine incident_diffuse (bounds, & ! diffuse solar and conservation check. need to convert wall fluxes to ground area - do fl = 1,num_urbanl - l = filter_urbanl(fl) + do fl = 1,num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) sdif_road(l,ib) = sdif(l,ib) * vf_sr(l) sdif_sunwall(l,ib) = sdif(l,ib) * vf_sw(l) sdif_shadewall(l,ib) = sdif(l,ib) * vf_sw(l) @@ -750,8 +775,8 @@ subroutine incident_diffuse (bounds, & ! error check - do fl = 1, num_urbanl - l = filter_urbanl(fl) + do fl = 1, num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) if (abs(err(l)) > 0.001_r8) then write (iulog,*) 'urban diffuse solar radiation balance error',err(l) write (iulog,*) 'clm model is stopping' @@ -767,11 +792,11 @@ end subroutine incident_diffuse !----------------------------------------------------------------------- subroutine net_solar (bounds , & - num_urbanl, filter_urbanl, coszen, canyon_hwr, wtroad_perv, sdir, sdif , & + num_urbanl_coszen_gt0, filter_urbanl_coszen_gt0, canyon_hwr, wtroad_perv, sdir, sdif , & alb_improad_dir, alb_perroad_dir, alb_wall_dir, alb_roof_dir , & alb_improad_dif, alb_perroad_dif, alb_wall_dif, alb_roof_dif , & - sdir_road, sdir_sunwall, sdir_shadewall, & - sdif_road, sdif_sunwall, sdif_shadewall, & + sdir_road, sdir_sunwall, sdir_shadewall , & + sdif_road, sdif_sunwall, sdif_shadewall , & sref_improad_dir, sref_perroad_dir, sref_sunwall_dir, sref_shadewall_dir, sref_roof_dir , & sref_improad_dif, sref_perroad_dif, sref_sunwall_dif, sref_shadewall_dif, sref_roof_dif , & urbanparams_inst, solarabs_inst) @@ -782,9 +807,8 @@ subroutine net_solar (bounds ! ! !ARGUMENTS: type (bounds_type), intent(in) :: bounds - integer , intent(in) :: num_urbanl ! number of urban landunits - integer , intent(in) :: filter_urbanl(:) ! urban landunit filter - real(r8), intent(in) :: coszen ( bounds%begl: ) ! cosine solar zenith angle [landunit] + integer, intent(in) :: num_urbanl_coszen_gt0 ! number of urban landunits with coszen > 0 + integer, intent(in) :: filter_urbanl_coszen_gt0(:) ! filter for urban landunits with coszen > 0 real(r8), intent(in) :: canyon_hwr ( bounds%begl: ) ! ratio of building height to street width [landunit] real(r8), intent(in) :: wtroad_perv ( bounds%begl: ) ! weight of pervious road wrt total road [landunit] real(r8), intent(in) :: sdir ( bounds%begl: , 1: ) ! direct beam solar radiation incident on horizontal surface [landunit, numrad] @@ -897,7 +921,6 @@ subroutine net_solar (bounds !----------------------------------------------------------------------- ! Enforce expected array sizes - SHR_ASSERT_ALL_FL((ubound(coszen) == (/bounds%endl/)), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(canyon_hwr) == (/bounds%endl/)), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(wtroad_perv) == (/bounds%endl/)), sourcefile, __LINE__) SHR_ASSERT_ALL_FL((ubound(sdir) == (/bounds%endl, numrad/)), sourcefile, __LINE__) @@ -948,351 +971,345 @@ subroutine net_solar (bounds ! Calculate impervious road - do fl = 1,num_urbanl - l = filter_urbanl(fl) + do fl = 1,num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) wtroad_imperv(l) = 1._r8 - wtroad_perv(l) end do do ib = 1,numrad - do fl = 1,num_urbanl - l = filter_urbanl(fl) - if (coszen(l) > 0._r8) then + do fl = 1,num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) + + ! initial absorption and reflection for road and both walls. + ! distribute reflected radiation to sky, road, and walls + ! according to appropriate view factor. radiation reflected to + ! road and walls will undergo multiple reflections within the canyon. + ! do separately for direct beam and diffuse radiation. + + ! direct beam + + road_a_dir(l) = 0.0_r8 + road_r_dir(l) = 0.0_r8 + improad_a_dir(l) = (1._r8-alb_improad_dir(l,ib)) * sdir_road(l,ib) + improad_r_dir(l) = alb_improad_dir(l,ib) * sdir_road(l,ib) + improad_r_sky_dir(l) = improad_r_dir(l) * vf_sr(l) + improad_r_sunwall_dir(l) = improad_r_dir(l) * vf_wr(l) + improad_r_shadewall_dir(l) = improad_r_dir(l) * vf_wr(l) + road_a_dir(l) = road_a_dir(l) + improad_a_dir(l)*wtroad_imperv(l) + road_r_dir(l) = road_r_dir(l) + improad_r_dir(l)*wtroad_imperv(l) + + perroad_a_dir(l) = (1._r8-alb_perroad_dir(l,ib)) * sdir_road(l,ib) + perroad_r_dir(l) = alb_perroad_dir(l,ib) * sdir_road(l,ib) + perroad_r_sky_dir(l) = perroad_r_dir(l) * vf_sr(l) + perroad_r_sunwall_dir(l) = perroad_r_dir(l) * vf_wr(l) + perroad_r_shadewall_dir(l) = perroad_r_dir(l) * vf_wr(l) + road_a_dir(l) = road_a_dir(l) + perroad_a_dir(l)*wtroad_perv(l) + road_r_dir(l) = road_r_dir(l) + perroad_r_dir(l)*wtroad_perv(l) + + road_r_sky_dir(l) = road_r_dir(l) * vf_sr(l) + road_r_sunwall_dir(l) = road_r_dir(l) * vf_wr(l) + road_r_shadewall_dir(l) = road_r_dir(l) * vf_wr(l) + + sunwall_a_dir(l) = (1._r8-alb_wall_dir(l,ib)) * sdir_sunwall(l,ib) + sunwall_r_dir(l) = alb_wall_dir(l,ib) * sdir_sunwall(l,ib) + sunwall_r_sky_dir(l) = sunwall_r_dir(l) * vf_sw(l) + sunwall_r_road_dir(l) = sunwall_r_dir(l) * vf_rw(l) + sunwall_r_shadewall_dir(l) = sunwall_r_dir(l) * vf_ww(l) + + shadewall_a_dir(l) = (1._r8-alb_wall_dir(l,ib)) * sdir_shadewall(l,ib) + shadewall_r_dir(l) = alb_wall_dir(l,ib) * sdir_shadewall(l,ib) + shadewall_r_sky_dir(l) = shadewall_r_dir(l) * vf_sw(l) + shadewall_r_road_dir(l) = shadewall_r_dir(l) * vf_rw(l) + shadewall_r_sunwall_dir(l) = shadewall_r_dir(l) * vf_ww(l) + + ! diffuse + + road_a_dif(l) = 0.0_r8 + road_r_dif(l) = 0.0_r8 + improad_a_dif(l) = (1._r8-alb_improad_dif(l,ib)) * sdif_road(l,ib) + improad_r_dif(l) = alb_improad_dif(l,ib) * sdif_road(l,ib) + improad_r_sky_dif(l) = improad_r_dif(l) * vf_sr(l) + improad_r_sunwall_dif(l) = improad_r_dif(l) * vf_wr(l) + improad_r_shadewall_dif(l) = improad_r_dif(l) * vf_wr(l) + road_a_dif(l) = road_a_dif(l) + improad_a_dif(l)*wtroad_imperv(l) + road_r_dif(l) = road_r_dif(l) + improad_r_dif(l)*wtroad_imperv(l) + + perroad_a_dif(l) = (1._r8-alb_perroad_dif(l,ib)) * sdif_road(l,ib) + perroad_r_dif(l) = alb_perroad_dif(l,ib) * sdif_road(l,ib) + perroad_r_sky_dif(l) = perroad_r_dif(l) * vf_sr(l) + perroad_r_sunwall_dif(l) = perroad_r_dif(l) * vf_wr(l) + perroad_r_shadewall_dif(l) = perroad_r_dif(l) * vf_wr(l) + road_a_dif(l) = road_a_dif(l) + perroad_a_dif(l)*wtroad_perv(l) + road_r_dif(l) = road_r_dif(l) + perroad_r_dif(l)*wtroad_perv(l) + + road_r_sky_dif(l) = road_r_dif(l) * vf_sr(l) + road_r_sunwall_dif(l) = road_r_dif(l) * vf_wr(l) + road_r_shadewall_dif(l) = road_r_dif(l) * vf_wr(l) + + sunwall_a_dif(l) = (1._r8-alb_wall_dif(l,ib)) * sdif_sunwall(l,ib) + sunwall_r_dif(l) = alb_wall_dif(l,ib) * sdif_sunwall(l,ib) + sunwall_r_sky_dif(l) = sunwall_r_dif(l) * vf_sw(l) + sunwall_r_road_dif(l) = sunwall_r_dif(l) * vf_rw(l) + sunwall_r_shadewall_dif(l) = sunwall_r_dif(l) * vf_ww(l) + + shadewall_a_dif(l) = (1._r8-alb_wall_dif(l,ib)) * sdif_shadewall(l,ib) + shadewall_r_dif(l) = alb_wall_dif(l,ib) * sdif_shadewall(l,ib) + shadewall_r_sky_dif(l) = shadewall_r_dif(l) * vf_sw(l) + shadewall_r_road_dif(l) = shadewall_r_dif(l) * vf_rw(l) + shadewall_r_sunwall_dif(l) = shadewall_r_dif(l) * vf_ww(l) + + ! initialize sum of direct and diffuse solar absorption and reflection for road and both walls + + sabs_improad_dir(l,ib) = improad_a_dir(l) + sabs_perroad_dir(l,ib) = perroad_a_dir(l) + sabs_sunwall_dir(l,ib) = sunwall_a_dir(l) + sabs_shadewall_dir(l,ib) = shadewall_a_dir(l) + + sabs_improad_dif(l,ib) = improad_a_dif(l) + sabs_perroad_dif(l,ib) = perroad_a_dif(l) + sabs_sunwall_dif(l,ib) = sunwall_a_dif(l) + sabs_shadewall_dif(l,ib) = shadewall_a_dif(l) + + sref_improad_dir(l,ib) = improad_r_sky_dir(l) + sref_perroad_dir(l,ib) = perroad_r_sky_dir(l) + sref_sunwall_dir(l,ib) = sunwall_r_sky_dir(l) + sref_shadewall_dir(l,ib) = shadewall_r_sky_dir(l) + + sref_improad_dif(l,ib) = improad_r_sky_dif(l) + sref_perroad_dif(l,ib) = perroad_r_sky_dif(l) + sref_sunwall_dif(l,ib) = sunwall_r_sky_dif(l) + sref_shadewall_dif(l,ib) = shadewall_r_sky_dif(l) + + end do + + ! absorption and reflection for walls and road with multiple reflections + ! (i.e., absorb and reflect initial reflection in canyon and allow for + ! subsequent scattering) + ! + ! (1) absorption and reflection of scattered solar radiation + ! road: reflected fluxes from walls need to be projected to ground area + ! wall: reflected flux from road needs to be projected to wall area + ! + ! (2) add absorbed radiation for ith reflection to total absorbed + ! + ! (3) distribute reflected radiation to sky, road, and walls according to view factors + ! + ! (4) add solar reflection to sky for ith reflection to total reflection + ! + ! (5) stop iteration when absorption for ith reflection is less than some nominal amount. + ! small convergence criteria is required to ensure solar radiation is conserved + ! + ! do separately for direct beam and diffuse + + do fl = 1,num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) + + ! reflected direct beam + + do iter_dir = 1, n + ! step (1) + + stot(l) = (sunwall_r_road_dir(l) + shadewall_r_road_dir(l))*canyon_hwr(l) + + road_a_dir(l) = 0.0_r8 + road_r_dir(l) = 0.0_r8 + improad_a_dir(l) = (1._r8-alb_improad_dir(l,ib)) * stot(l) + improad_r_dir(l) = alb_improad_dir(l,ib) * stot(l) + road_a_dir(l) = road_a_dir(l) + improad_a_dir(l)*wtroad_imperv(l) + road_r_dir(l) = road_r_dir(l) + improad_r_dir(l)*wtroad_imperv(l) + perroad_a_dir(l) = (1._r8-alb_perroad_dir(l,ib)) * stot(l) + perroad_r_dir(l) = alb_perroad_dir(l,ib) * stot(l) + road_a_dir(l) = road_a_dir(l) + perroad_a_dir(l)*wtroad_perv(l) + road_r_dir(l) = road_r_dir(l) + perroad_r_dir(l)*wtroad_perv(l) + + stot(l) = road_r_sunwall_dir(l)/canyon_hwr(l) + shadewall_r_sunwall_dir(l) + sunwall_a_dir(l) = (1._r8-alb_wall_dir(l,ib)) * stot(l) + sunwall_r_dir(l) = alb_wall_dir(l,ib) * stot(l) + + stot(l) = road_r_shadewall_dir(l)/canyon_hwr(l) + sunwall_r_shadewall_dir(l) + shadewall_a_dir(l) = (1._r8-alb_wall_dir(l,ib)) * stot(l) + shadewall_r_dir(l) = alb_wall_dir(l,ib) * stot(l) - ! initial absorption and reflection for road and both walls. - ! distribute reflected radiation to sky, road, and walls - ! according to appropriate view factor. radiation reflected to - ! road and walls will undergo multiple reflections within the canyon. - ! do separately for direct beam and diffuse radiation. + ! step (2) - ! direct beam + sabs_improad_dir(l,ib) = sabs_improad_dir(l,ib) + improad_a_dir(l) + sabs_perroad_dir(l,ib) = sabs_perroad_dir(l,ib) + perroad_a_dir(l) + sabs_sunwall_dir(l,ib) = sabs_sunwall_dir(l,ib) + sunwall_a_dir(l) + sabs_shadewall_dir(l,ib) = sabs_shadewall_dir(l,ib) + shadewall_a_dir(l) + + ! step (3) - road_a_dir(l) = 0.0_r8 - road_r_dir(l) = 0.0_r8 - improad_a_dir(l) = (1._r8-alb_improad_dir(l,ib)) * sdir_road(l,ib) - improad_r_dir(l) = alb_improad_dir(l,ib) * sdir_road(l,ib) improad_r_sky_dir(l) = improad_r_dir(l) * vf_sr(l) improad_r_sunwall_dir(l) = improad_r_dir(l) * vf_wr(l) improad_r_shadewall_dir(l) = improad_r_dir(l) * vf_wr(l) - road_a_dir(l) = road_a_dir(l) + improad_a_dir(l)*wtroad_imperv(l) - road_r_dir(l) = road_r_dir(l) + improad_r_dir(l)*wtroad_imperv(l) - perroad_a_dir(l) = (1._r8-alb_perroad_dir(l,ib)) * sdir_road(l,ib) - perroad_r_dir(l) = alb_perroad_dir(l,ib) * sdir_road(l,ib) perroad_r_sky_dir(l) = perroad_r_dir(l) * vf_sr(l) perroad_r_sunwall_dir(l) = perroad_r_dir(l) * vf_wr(l) perroad_r_shadewall_dir(l) = perroad_r_dir(l) * vf_wr(l) - road_a_dir(l) = road_a_dir(l) + perroad_a_dir(l)*wtroad_perv(l) - road_r_dir(l) = road_r_dir(l) + perroad_r_dir(l)*wtroad_perv(l) road_r_sky_dir(l) = road_r_dir(l) * vf_sr(l) road_r_sunwall_dir(l) = road_r_dir(l) * vf_wr(l) road_r_shadewall_dir(l) = road_r_dir(l) * vf_wr(l) - sunwall_a_dir(l) = (1._r8-alb_wall_dir(l,ib)) * sdir_sunwall(l,ib) - sunwall_r_dir(l) = alb_wall_dir(l,ib) * sdir_sunwall(l,ib) sunwall_r_sky_dir(l) = sunwall_r_dir(l) * vf_sw(l) sunwall_r_road_dir(l) = sunwall_r_dir(l) * vf_rw(l) sunwall_r_shadewall_dir(l) = sunwall_r_dir(l) * vf_ww(l) - shadewall_a_dir(l) = (1._r8-alb_wall_dir(l,ib)) * sdir_shadewall(l,ib) - shadewall_r_dir(l) = alb_wall_dir(l,ib) * sdir_shadewall(l,ib) shadewall_r_sky_dir(l) = shadewall_r_dir(l) * vf_sw(l) shadewall_r_road_dir(l) = shadewall_r_dir(l) * vf_rw(l) shadewall_r_sunwall_dir(l) = shadewall_r_dir(l) * vf_ww(l) - ! diffuse + ! step (4) + + sref_improad_dir(l,ib) = sref_improad_dir(l,ib) + improad_r_sky_dir(l) + sref_perroad_dir(l,ib) = sref_perroad_dir(l,ib) + perroad_r_sky_dir(l) + sref_sunwall_dir(l,ib) = sref_sunwall_dir(l,ib) + sunwall_r_sky_dir(l) + sref_shadewall_dir(l,ib) = sref_shadewall_dir(l,ib) + shadewall_r_sky_dir(l) + + ! step (5) + + crit = max(road_a_dir(l), sunwall_a_dir(l), shadewall_a_dir(l)) + if (crit < errcrit) exit + end do + if (iter_dir >= n) then + write (iulog,*) 'urban net solar radiation error: no convergence, direct beam' + write (iulog,*) 'clm model is stopping' + call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) + endif + + ! reflected diffuse + + do iter_dif = 1, n + ! step (1) + + stot(l) = (sunwall_r_road_dif(l) + shadewall_r_road_dif(l))*canyon_hwr(l) + road_a_dif(l) = 0.0_r8 + road_r_dif(l) = 0.0_r8 + improad_a_dif(l) = (1._r8-alb_improad_dif(l,ib)) * stot(l) + improad_r_dif(l) = alb_improad_dif(l,ib) * stot(l) + road_a_dif(l) = road_a_dif(l) + improad_a_dif(l)*wtroad_imperv(l) + road_r_dif(l) = road_r_dif(l) + improad_r_dif(l)*wtroad_imperv(l) + perroad_a_dif(l) = (1._r8-alb_perroad_dif(l,ib)) * stot(l) + perroad_r_dif(l) = alb_perroad_dif(l,ib) * stot(l) + road_a_dif(l) = road_a_dif(l) + perroad_a_dif(l)*wtroad_perv(l) + road_r_dif(l) = road_r_dif(l) + perroad_r_dif(l)*wtroad_perv(l) + + stot(l) = road_r_sunwall_dif(l)/canyon_hwr(l) + shadewall_r_sunwall_dif(l) + sunwall_a_dif(l) = (1._r8-alb_wall_dif(l,ib)) * stot(l) + sunwall_r_dif(l) = alb_wall_dif(l,ib) * stot(l) + + stot(l) = road_r_shadewall_dif(l)/canyon_hwr(l) + sunwall_r_shadewall_dif(l) + shadewall_a_dif(l) = (1._r8-alb_wall_dif(l,ib)) * stot(l) + shadewall_r_dif(l) = alb_wall_dif(l,ib) * stot(l) + + ! step (2) + + sabs_improad_dif(l,ib) = sabs_improad_dif(l,ib) + improad_a_dif(l) + sabs_perroad_dif(l,ib) = sabs_perroad_dif(l,ib) + perroad_a_dif(l) + sabs_sunwall_dif(l,ib) = sabs_sunwall_dif(l,ib) + sunwall_a_dif(l) + sabs_shadewall_dif(l,ib) = sabs_shadewall_dif(l,ib) + shadewall_a_dif(l) + + ! step (3) - road_a_dif(l) = 0.0_r8 - road_r_dif(l) = 0.0_r8 - improad_a_dif(l) = (1._r8-alb_improad_dif(l,ib)) * sdif_road(l,ib) - improad_r_dif(l) = alb_improad_dif(l,ib) * sdif_road(l,ib) improad_r_sky_dif(l) = improad_r_dif(l) * vf_sr(l) improad_r_sunwall_dif(l) = improad_r_dif(l) * vf_wr(l) improad_r_shadewall_dif(l) = improad_r_dif(l) * vf_wr(l) - road_a_dif(l) = road_a_dif(l) + improad_a_dif(l)*wtroad_imperv(l) - road_r_dif(l) = road_r_dif(l) + improad_r_dif(l)*wtroad_imperv(l) - perroad_a_dif(l) = (1._r8-alb_perroad_dif(l,ib)) * sdif_road(l,ib) - perroad_r_dif(l) = alb_perroad_dif(l,ib) * sdif_road(l,ib) perroad_r_sky_dif(l) = perroad_r_dif(l) * vf_sr(l) perroad_r_sunwall_dif(l) = perroad_r_dif(l) * vf_wr(l) perroad_r_shadewall_dif(l) = perroad_r_dif(l) * vf_wr(l) - road_a_dif(l) = road_a_dif(l) + perroad_a_dif(l)*wtroad_perv(l) - road_r_dif(l) = road_r_dif(l) + perroad_r_dif(l)*wtroad_perv(l) road_r_sky_dif(l) = road_r_dif(l) * vf_sr(l) road_r_sunwall_dif(l) = road_r_dif(l) * vf_wr(l) road_r_shadewall_dif(l) = road_r_dif(l) * vf_wr(l) - sunwall_a_dif(l) = (1._r8-alb_wall_dif(l,ib)) * sdif_sunwall(l,ib) - sunwall_r_dif(l) = alb_wall_dif(l,ib) * sdif_sunwall(l,ib) sunwall_r_sky_dif(l) = sunwall_r_dif(l) * vf_sw(l) sunwall_r_road_dif(l) = sunwall_r_dif(l) * vf_rw(l) sunwall_r_shadewall_dif(l) = sunwall_r_dif(l) * vf_ww(l) - shadewall_a_dif(l) = (1._r8-alb_wall_dif(l,ib)) * sdif_shadewall(l,ib) - shadewall_r_dif(l) = alb_wall_dif(l,ib) * sdif_shadewall(l,ib) shadewall_r_sky_dif(l) = shadewall_r_dif(l) * vf_sw(l) - shadewall_r_road_dif(l) = shadewall_r_dif(l) * vf_rw(l) - shadewall_r_sunwall_dif(l) = shadewall_r_dif(l) * vf_ww(l) - - ! initialize sum of direct and diffuse solar absorption and reflection for road and both walls - - sabs_improad_dir(l,ib) = improad_a_dir(l) - sabs_perroad_dir(l,ib) = perroad_a_dir(l) - sabs_sunwall_dir(l,ib) = sunwall_a_dir(l) - sabs_shadewall_dir(l,ib) = shadewall_a_dir(l) - - sabs_improad_dif(l,ib) = improad_a_dif(l) - sabs_perroad_dif(l,ib) = perroad_a_dif(l) - sabs_sunwall_dif(l,ib) = sunwall_a_dif(l) - sabs_shadewall_dif(l,ib) = shadewall_a_dif(l) - - sref_improad_dir(l,ib) = improad_r_sky_dir(l) - sref_perroad_dir(l,ib) = perroad_r_sky_dir(l) - sref_sunwall_dir(l,ib) = sunwall_r_sky_dir(l) - sref_shadewall_dir(l,ib) = shadewall_r_sky_dir(l) - - sref_improad_dif(l,ib) = improad_r_sky_dif(l) - sref_perroad_dif(l,ib) = perroad_r_sky_dif(l) - sref_sunwall_dif(l,ib) = sunwall_r_sky_dif(l) - sref_shadewall_dif(l,ib) = shadewall_r_sky_dif(l) - endif - - end do + shadewall_r_road_dif(l) = shadewall_r_dif(l) * vf_rw(l) + shadewall_r_sunwall_dif(l) = shadewall_r_dif(l) * vf_ww(l) - ! absorption and reflection for walls and road with multiple reflections - ! (i.e., absorb and reflect initial reflection in canyon and allow for - ! subsequent scattering) - ! - ! (1) absorption and reflection of scattered solar radiation - ! road: reflected fluxes from walls need to be projected to ground area - ! wall: reflected flux from road needs to be projected to wall area - ! - ! (2) add absorbed radiation for ith reflection to total absorbed - ! - ! (3) distribute reflected radiation to sky, road, and walls according to view factors - ! - ! (4) add solar reflection to sky for ith reflection to total reflection - ! - ! (5) stop iteration when absorption for ith reflection is less than some nominal amount. - ! small convergence criteria is required to ensure solar radiation is conserved - ! - ! do separately for direct beam and diffuse + ! step (4) - do fl = 1,num_urbanl - l = filter_urbanl(fl) - if (coszen(l) > 0._r8) then - - ! reflected direct beam - - do iter_dir = 1, n - ! step (1) - - stot(l) = (sunwall_r_road_dir(l) + shadewall_r_road_dir(l))*canyon_hwr(l) - - road_a_dir(l) = 0.0_r8 - road_r_dir(l) = 0.0_r8 - improad_a_dir(l) = (1._r8-alb_improad_dir(l,ib)) * stot(l) - improad_r_dir(l) = alb_improad_dir(l,ib) * stot(l) - road_a_dir(l) = road_a_dir(l) + improad_a_dir(l)*wtroad_imperv(l) - road_r_dir(l) = road_r_dir(l) + improad_r_dir(l)*wtroad_imperv(l) - perroad_a_dir(l) = (1._r8-alb_perroad_dir(l,ib)) * stot(l) - perroad_r_dir(l) = alb_perroad_dir(l,ib) * stot(l) - road_a_dir(l) = road_a_dir(l) + perroad_a_dir(l)*wtroad_perv(l) - road_r_dir(l) = road_r_dir(l) + perroad_r_dir(l)*wtroad_perv(l) + sref_improad_dif(l,ib) = sref_improad_dif(l,ib) + improad_r_sky_dif(l) + sref_perroad_dif(l,ib) = sref_perroad_dif(l,ib) + perroad_r_sky_dif(l) + sref_sunwall_dif(l,ib) = sref_sunwall_dif(l,ib) + sunwall_r_sky_dif(l) + sref_shadewall_dif(l,ib) = sref_shadewall_dif(l,ib) + shadewall_r_sky_dif(l) - stot(l) = road_r_sunwall_dir(l)/canyon_hwr(l) + shadewall_r_sunwall_dir(l) - sunwall_a_dir(l) = (1._r8-alb_wall_dir(l,ib)) * stot(l) - sunwall_r_dir(l) = alb_wall_dir(l,ib) * stot(l) + ! step (5) - stot(l) = road_r_shadewall_dir(l)/canyon_hwr(l) + sunwall_r_shadewall_dir(l) - shadewall_a_dir(l) = (1._r8-alb_wall_dir(l,ib)) * stot(l) - shadewall_r_dir(l) = alb_wall_dir(l,ib) * stot(l) - - ! step (2) - - sabs_improad_dir(l,ib) = sabs_improad_dir(l,ib) + improad_a_dir(l) - sabs_perroad_dir(l,ib) = sabs_perroad_dir(l,ib) + perroad_a_dir(l) - sabs_sunwall_dir(l,ib) = sabs_sunwall_dir(l,ib) + sunwall_a_dir(l) - sabs_shadewall_dir(l,ib) = sabs_shadewall_dir(l,ib) + shadewall_a_dir(l) + crit = max(road_a_dif(l), sunwall_a_dif(l), shadewall_a_dif(l)) + if (crit < errcrit) exit + end do + if (iter_dif >= n) then + write (iulog,*) 'urban net solar radiation error: no convergence, diffuse' + write (iulog,*) 'clm model is stopping' + call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) + endif - ! step (3) + ! total reflected by canyon - sum of solar reflection to sky from canyon. + ! project wall fluxes to horizontal surface + + sref_canyon_dir(l) = 0.0_r8 + sref_canyon_dif(l) = 0.0_r8 + sref_canyon_dir(l) = sref_canyon_dir(l) + sref_improad_dir(l,ib)*wtroad_imperv(l) + sref_canyon_dif(l) = sref_canyon_dif(l) + sref_improad_dif(l,ib)*wtroad_imperv(l) + sref_canyon_dir(l) = sref_canyon_dir(l) + sref_perroad_dir(l,ib)*wtroad_perv(l) + sref_canyon_dif(l) = sref_canyon_dif(l) + sref_perroad_dif(l,ib)*wtroad_perv(l) + sref_canyon_dir(l) = sref_canyon_dir(l) + (sref_sunwall_dir(l,ib) + sref_shadewall_dir(l,ib))*canyon_hwr(l) + sref_canyon_dif(l) = sref_canyon_dif(l) + (sref_sunwall_dif(l,ib) + sref_shadewall_dif(l,ib))*canyon_hwr(l) + + ! total absorbed by canyon. project wall fluxes to horizontal surface + + sabs_canyon_dir(l) = 0.0_r8 + sabs_canyon_dif(l) = 0.0_r8 + sabs_canyon_dir(l) = sabs_canyon_dir(l) + sabs_improad_dir(l,ib)*wtroad_imperv(l) + sabs_canyon_dif(l) = sabs_canyon_dif(l) + sabs_improad_dif(l,ib)*wtroad_imperv(l) + sabs_canyon_dir(l) = sabs_canyon_dir(l) + sabs_perroad_dir(l,ib)*wtroad_perv(l) + sabs_canyon_dif(l) = sabs_canyon_dif(l) + sabs_perroad_dif(l,ib)*wtroad_perv(l) + sabs_canyon_dir(l) = sabs_canyon_dir(l) + (sabs_sunwall_dir(l,ib) + sabs_shadewall_dir(l,ib))*canyon_hwr(l) + sabs_canyon_dif(l) = sabs_canyon_dif(l) + (sabs_sunwall_dif(l,ib) + sabs_shadewall_dif(l,ib))*canyon_hwr(l) + + ! conservation check. note: previous conservation checks confirm partioning of total direct + ! beam and diffuse radiation from atmosphere to road and walls is conserved as + ! sdir (from atmosphere) = sdir_road + (sdir_sunwall + sdir_shadewall)*canyon_hwr + ! sdif (from atmosphere) = sdif_road + (sdif_sunwall + sdif_shadewall)*canyon_hwr + + stot_dir(l) = sdir_road(l,ib) + (sdir_sunwall(l,ib) + sdir_shadewall(l,ib))*canyon_hwr(l) + stot_dif(l) = sdif_road(l,ib) + (sdif_sunwall(l,ib) + sdif_shadewall(l,ib))*canyon_hwr(l) + + err = stot_dir(l) + stot_dif(l) & + - (sabs_canyon_dir(l) + sabs_canyon_dif(l) + sref_canyon_dir(l) + sref_canyon_dif(l)) + if (abs(err) > 0.001_r8 ) then + write(iulog,*)'urban net solar radiation balance error for ib=',ib,' err= ',err + write(iulog,*)' l= ',l,' ib= ',ib + write(iulog,*)' stot_dir = ',stot_dir(l) + write(iulog,*)' stot_dif = ',stot_dif(l) + write(iulog,*)' sabs_canyon_dir = ',sabs_canyon_dir(l) + write(iulog,*)' sabs_canyon_dif = ',sabs_canyon_dif(l) + write(iulog,*)' sref_canyon_dir = ',sref_canyon_dir(l) + write(iulog,*)' sref_canyon_dif = ',sref_canyon_dir(l) + write(iulog,*) 'clm model is stopping' + call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) + endif - improad_r_sky_dir(l) = improad_r_dir(l) * vf_sr(l) - improad_r_sunwall_dir(l) = improad_r_dir(l) * vf_wr(l) - improad_r_shadewall_dir(l) = improad_r_dir(l) * vf_wr(l) + ! canyon albedo - perroad_r_sky_dir(l) = perroad_r_dir(l) * vf_sr(l) - perroad_r_sunwall_dir(l) = perroad_r_dir(l) * vf_wr(l) - perroad_r_shadewall_dir(l) = perroad_r_dir(l) * vf_wr(l) - - road_r_sky_dir(l) = road_r_dir(l) * vf_sr(l) - road_r_sunwall_dir(l) = road_r_dir(l) * vf_wr(l) - road_r_shadewall_dir(l) = road_r_dir(l) * vf_wr(l) - - sunwall_r_sky_dir(l) = sunwall_r_dir(l) * vf_sw(l) - sunwall_r_road_dir(l) = sunwall_r_dir(l) * vf_rw(l) - sunwall_r_shadewall_dir(l) = sunwall_r_dir(l) * vf_ww(l) - - shadewall_r_sky_dir(l) = shadewall_r_dir(l) * vf_sw(l) - shadewall_r_road_dir(l) = shadewall_r_dir(l) * vf_rw(l) - shadewall_r_sunwall_dir(l) = shadewall_r_dir(l) * vf_ww(l) - - ! step (4) - - sref_improad_dir(l,ib) = sref_improad_dir(l,ib) + improad_r_sky_dir(l) - sref_perroad_dir(l,ib) = sref_perroad_dir(l,ib) + perroad_r_sky_dir(l) - sref_sunwall_dir(l,ib) = sref_sunwall_dir(l,ib) + sunwall_r_sky_dir(l) - sref_shadewall_dir(l,ib) = sref_shadewall_dir(l,ib) + shadewall_r_sky_dir(l) - - ! step (5) - - crit = max(road_a_dir(l), sunwall_a_dir(l), shadewall_a_dir(l)) - if (crit < errcrit) exit - end do - if (iter_dir >= n) then - write (iulog,*) 'urban net solar radiation error: no convergence, direct beam' - write (iulog,*) 'clm model is stopping' - call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) - endif - - ! reflected diffuse - - do iter_dif = 1, n - ! step (1) - - stot(l) = (sunwall_r_road_dif(l) + shadewall_r_road_dif(l))*canyon_hwr(l) - road_a_dif(l) = 0.0_r8 - road_r_dif(l) = 0.0_r8 - improad_a_dif(l) = (1._r8-alb_improad_dif(l,ib)) * stot(l) - improad_r_dif(l) = alb_improad_dif(l,ib) * stot(l) - road_a_dif(l) = road_a_dif(l) + improad_a_dif(l)*wtroad_imperv(l) - road_r_dif(l) = road_r_dif(l) + improad_r_dif(l)*wtroad_imperv(l) - perroad_a_dif(l) = (1._r8-alb_perroad_dif(l,ib)) * stot(l) - perroad_r_dif(l) = alb_perroad_dif(l,ib) * stot(l) - road_a_dif(l) = road_a_dif(l) + perroad_a_dif(l)*wtroad_perv(l) - road_r_dif(l) = road_r_dif(l) + perroad_r_dif(l)*wtroad_perv(l) - - stot(l) = road_r_sunwall_dif(l)/canyon_hwr(l) + shadewall_r_sunwall_dif(l) - sunwall_a_dif(l) = (1._r8-alb_wall_dif(l,ib)) * stot(l) - sunwall_r_dif(l) = alb_wall_dif(l,ib) * stot(l) - - stot(l) = road_r_shadewall_dif(l)/canyon_hwr(l) + sunwall_r_shadewall_dif(l) - shadewall_a_dif(l) = (1._r8-alb_wall_dif(l,ib)) * stot(l) - shadewall_r_dif(l) = alb_wall_dif(l,ib) * stot(l) - - ! step (2) - - sabs_improad_dif(l,ib) = sabs_improad_dif(l,ib) + improad_a_dif(l) - sabs_perroad_dif(l,ib) = sabs_perroad_dif(l,ib) + perroad_a_dif(l) - sabs_sunwall_dif(l,ib) = sabs_sunwall_dif(l,ib) + sunwall_a_dif(l) - sabs_shadewall_dif(l,ib) = sabs_shadewall_dif(l,ib) + shadewall_a_dif(l) - - ! step (3) - - improad_r_sky_dif(l) = improad_r_dif(l) * vf_sr(l) - improad_r_sunwall_dif(l) = improad_r_dif(l) * vf_wr(l) - improad_r_shadewall_dif(l) = improad_r_dif(l) * vf_wr(l) - - perroad_r_sky_dif(l) = perroad_r_dif(l) * vf_sr(l) - perroad_r_sunwall_dif(l) = perroad_r_dif(l) * vf_wr(l) - perroad_r_shadewall_dif(l) = perroad_r_dif(l) * vf_wr(l) - - road_r_sky_dif(l) = road_r_dif(l) * vf_sr(l) - road_r_sunwall_dif(l) = road_r_dif(l) * vf_wr(l) - road_r_shadewall_dif(l) = road_r_dif(l) * vf_wr(l) - - sunwall_r_sky_dif(l) = sunwall_r_dif(l) * vf_sw(l) - sunwall_r_road_dif(l) = sunwall_r_dif(l) * vf_rw(l) - sunwall_r_shadewall_dif(l) = sunwall_r_dif(l) * vf_ww(l) - - shadewall_r_sky_dif(l) = shadewall_r_dif(l) * vf_sw(l) - shadewall_r_road_dif(l) = shadewall_r_dif(l) * vf_rw(l) - shadewall_r_sunwall_dif(l) = shadewall_r_dif(l) * vf_ww(l) - - ! step (4) - - sref_improad_dif(l,ib) = sref_improad_dif(l,ib) + improad_r_sky_dif(l) - sref_perroad_dif(l,ib) = sref_perroad_dif(l,ib) + perroad_r_sky_dif(l) - sref_sunwall_dif(l,ib) = sref_sunwall_dif(l,ib) + sunwall_r_sky_dif(l) - sref_shadewall_dif(l,ib) = sref_shadewall_dif(l,ib) + shadewall_r_sky_dif(l) - - ! step (5) - - crit = max(road_a_dif(l), sunwall_a_dif(l), shadewall_a_dif(l)) - if (crit < errcrit) exit - end do - if (iter_dif >= n) then - write (iulog,*) 'urban net solar radiation error: no convergence, diffuse' - write (iulog,*) 'clm model is stopping' - call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) - endif - - ! total reflected by canyon - sum of solar reflection to sky from canyon. - ! project wall fluxes to horizontal surface - - sref_canyon_dir(l) = 0.0_r8 - sref_canyon_dif(l) = 0.0_r8 - sref_canyon_dir(l) = sref_canyon_dir(l) + sref_improad_dir(l,ib)*wtroad_imperv(l) - sref_canyon_dif(l) = sref_canyon_dif(l) + sref_improad_dif(l,ib)*wtroad_imperv(l) - sref_canyon_dir(l) = sref_canyon_dir(l) + sref_perroad_dir(l,ib)*wtroad_perv(l) - sref_canyon_dif(l) = sref_canyon_dif(l) + sref_perroad_dif(l,ib)*wtroad_perv(l) - sref_canyon_dir(l) = sref_canyon_dir(l) + (sref_sunwall_dir(l,ib) + sref_shadewall_dir(l,ib))*canyon_hwr(l) - sref_canyon_dif(l) = sref_canyon_dif(l) + (sref_sunwall_dif(l,ib) + sref_shadewall_dif(l,ib))*canyon_hwr(l) - - ! total absorbed by canyon. project wall fluxes to horizontal surface - - sabs_canyon_dir(l) = 0.0_r8 - sabs_canyon_dif(l) = 0.0_r8 - sabs_canyon_dir(l) = sabs_canyon_dir(l) + sabs_improad_dir(l,ib)*wtroad_imperv(l) - sabs_canyon_dif(l) = sabs_canyon_dif(l) + sabs_improad_dif(l,ib)*wtroad_imperv(l) - sabs_canyon_dir(l) = sabs_canyon_dir(l) + sabs_perroad_dir(l,ib)*wtroad_perv(l) - sabs_canyon_dif(l) = sabs_canyon_dif(l) + sabs_perroad_dif(l,ib)*wtroad_perv(l) - sabs_canyon_dir(l) = sabs_canyon_dir(l) + (sabs_sunwall_dir(l,ib) + sabs_shadewall_dir(l,ib))*canyon_hwr(l) - sabs_canyon_dif(l) = sabs_canyon_dif(l) + (sabs_sunwall_dif(l,ib) + sabs_shadewall_dif(l,ib))*canyon_hwr(l) - - ! conservation check. note: previous conservation checks confirm partioning of total direct - ! beam and diffuse radiation from atmosphere to road and walls is conserved as - ! sdir (from atmosphere) = sdir_road + (sdir_sunwall + sdir_shadewall)*canyon_hwr - ! sdif (from atmosphere) = sdif_road + (sdif_sunwall + sdif_shadewall)*canyon_hwr - - stot_dir(l) = sdir_road(l,ib) + (sdir_sunwall(l,ib) + sdir_shadewall(l,ib))*canyon_hwr(l) - stot_dif(l) = sdif_road(l,ib) + (sdif_sunwall(l,ib) + sdif_shadewall(l,ib))*canyon_hwr(l) - - err = stot_dir(l) + stot_dif(l) & - - (sabs_canyon_dir(l) + sabs_canyon_dif(l) + sref_canyon_dir(l) + sref_canyon_dif(l)) - if (abs(err) > 0.001_r8 ) then - write(iulog,*)'urban net solar radiation balance error for ib=',ib,' err= ',err - write(iulog,*)' l= ',l,' ib= ',ib - write(iulog,*)' stot_dir = ',stot_dir(l) - write(iulog,*)' stot_dif = ',stot_dif(l) - write(iulog,*)' sabs_canyon_dir = ',sabs_canyon_dir(l) - write(iulog,*)' sabs_canyon_dif = ',sabs_canyon_dif(l) - write(iulog,*)' sref_canyon_dir = ',sref_canyon_dir(l) - write(iulog,*)' sref_canyon_dif = ',sref_canyon_dir(l) - write(iulog,*) 'clm model is stopping' - call endrun(subgrid_index=l, subgrid_level=subgrid_level_landunit, msg=errmsg(sourcefile, __LINE__)) - endif - - ! canyon albedo - - canyon_alb_dif(l) = sref_canyon_dif(l) / max(stot_dif(l), 1.e-06_r8) - canyon_alb_dir(l) = sref_canyon_dir(l) / max(stot_dir(l), 1.e-06_r8) - end if + canyon_alb_dif(l) = sref_canyon_dif(l) / max(stot_dif(l), 1.e-06_r8) + canyon_alb_dir(l) = sref_canyon_dir(l) / max(stot_dir(l), 1.e-06_r8) end do ! end of landunit loop - ! Refected and absorbed solar radiation per unit incident radiation for roof + ! Reflected and absorbed solar radiation per unit incident radiation for roof - do fl = 1,num_urbanl - l = filter_urbanl(fl) - if (coszen(l) > 0._r8) then - sref_roof_dir(l,ib) = alb_roof_dir(l,ib) * sdir(l,ib) - sref_roof_dif(l,ib) = alb_roof_dif(l,ib) * sdif(l,ib) - sabs_roof_dir(l,ib) = sdir(l,ib) - sref_roof_dir(l,ib) - sabs_roof_dif(l,ib) = sdif(l,ib) - sref_roof_dif(l,ib) - end if + do fl = 1,num_urbanl_coszen_gt0 + l = filter_urbanl_coszen_gt0(fl) + sref_roof_dir(l,ib) = alb_roof_dir(l,ib) * sdir(l,ib) + sref_roof_dif(l,ib) = alb_roof_dif(l,ib) * sdif(l,ib) + sabs_roof_dir(l,ib) = sdir(l,ib) - sref_roof_dir(l,ib) + sabs_roof_dif(l,ib) = sdif(l,ib) - sref_roof_dif(l,ib) end do end do ! end of radiation band loop diff --git a/src/biogeophys/test/Balance_test/CMakeLists.txt b/src/biogeophys/test/Balance_test/CMakeLists.txt index 541d4fb266..e140323124 100644 --- a/src/biogeophys/test/Balance_test/CMakeLists.txt +++ b/src/biogeophys/test/Balance_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(balance TEST_SOURCES "test_Balance.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/Daylength_test/CMakeLists.txt b/src/biogeophys/test/Daylength_test/CMakeLists.txt index 2e5cb58cf9..bd2d6407a9 100644 --- a/src/biogeophys/test/Daylength_test/CMakeLists.txt +++ b/src/biogeophys/test/Daylength_test/CMakeLists.txt @@ -4,4 +4,4 @@ set (pfunit_sources add_pfunit_ctest(Daylength TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/HillslopeHydrology_test/CMakeLists.txt b/src/biogeophys/test/HillslopeHydrology_test/CMakeLists.txt index f40baf96ed..078934cc78 100644 --- a/src/biogeophys/test/HillslopeHydrology_test/CMakeLists.txt +++ b/src/biogeophys/test/HillslopeHydrology_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(HillslopeHydrologyUtils TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/Irrigation_test/CMakeLists.txt b/src/biogeophys/test/Irrigation_test/CMakeLists.txt index 8cb531ba1a..4acf72961d 100644 --- a/src/biogeophys/test/Irrigation_test/CMakeLists.txt +++ b/src/biogeophys/test/Irrigation_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(irrigation TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/Photosynthesis_test/CMakeLists.txt b/src/biogeophys/test/Photosynthesis_test/CMakeLists.txt index 29810cbd9d..628a98994a 100644 --- a/src/biogeophys/test/Photosynthesis_test/CMakeLists.txt +++ b/src/biogeophys/test/Photosynthesis_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(Photosynthesis TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/SnowHydrology_test/CMakeLists.txt b/src/biogeophys/test/SnowHydrology_test/CMakeLists.txt index 600356b2ff..9e1738ab83 100644 --- a/src/biogeophys/test/SnowHydrology_test/CMakeLists.txt +++ b/src/biogeophys/test/SnowHydrology_test/CMakeLists.txt @@ -5,4 +5,4 @@ set (pfunit_sources add_pfunit_ctest(SnowHydrology TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/TotalWaterAndHeat_test/CMakeLists.txt b/src/biogeophys/test/TotalWaterAndHeat_test/CMakeLists.txt index a82532f69b..424515e414 100644 --- a/src/biogeophys/test/TotalWaterAndHeat_test/CMakeLists.txt +++ b/src/biogeophys/test/TotalWaterAndHeat_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(total_water_and_heat TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/WaterTracerContainerType_test/CMakeLists.txt b/src/biogeophys/test/WaterTracerContainerType_test/CMakeLists.txt index 283906a442..645972aa1e 100644 --- a/src/biogeophys/test/WaterTracerContainerType_test/CMakeLists.txt +++ b/src/biogeophys/test/WaterTracerContainerType_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(water_tracer_container TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/WaterTracerUtils_test/CMakeLists.txt b/src/biogeophys/test/WaterTracerUtils_test/CMakeLists.txt index 321e06883a..1a65bbfadd 100644 --- a/src/biogeophys/test/WaterTracerUtils_test/CMakeLists.txt +++ b/src/biogeophys/test/WaterTracerUtils_test/CMakeLists.txt @@ -5,4 +5,4 @@ set (pfunit_sources add_pfunit_ctest(water_tracer_utils TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/WaterType_test/CMakeLists.txt b/src/biogeophys/test/WaterType_test/CMakeLists.txt index 506179aabd..3f0ab409da 100644 --- a/src/biogeophys/test/WaterType_test/CMakeLists.txt +++ b/src/biogeophys/test/WaterType_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(water_type TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/biogeophys/test/Wateratm2lnd_test/CMakeLists.txt b/src/biogeophys/test/Wateratm2lnd_test/CMakeLists.txt index c2157952e0..1ddb840431 100644 --- a/src/biogeophys/test/Wateratm2lnd_test/CMakeLists.txt +++ b/src/biogeophys/test/Wateratm2lnd_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(water_atm2lnd TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/cpl/nuopc/lnd_comp_nuopc.F90 b/src/cpl/nuopc/lnd_comp_nuopc.F90 index 7fe93454ac..c76414bf5d 100644 --- a/src/cpl/nuopc/lnd_comp_nuopc.F90 +++ b/src/cpl/nuopc/lnd_comp_nuopc.F90 @@ -235,7 +235,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return ! Note still need compid for those parts of the code that use the data model - ! functionality through subroutine calls + ! functionality through subroutine calls (MCTID just means the Model ComonenT IDentification number) call NUOPC_CompAttributeGet(gcomp, name='MCTID', value=cvalue, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return read(cvalue,*) compid ! convert from string to integer @@ -655,7 +655,10 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc) ! --------------------- ! Finish initializing ctsm ! --------------------- - call initialize2(ni, nj) + call ESMF_ClockGet(clock, currTime=currtime, rc=rc) + if (ChkErr(rc,__LINE__,u_FILE_u)) return + + call initialize2(ni, nj, currtime) !-------------------------------- ! Create land export state @@ -1038,53 +1041,54 @@ subroutine ModelSetRunClock(gcomp, rc) call ESMF_LogWrite(subname//'setting alarms for ' // trim(name), ESMF_LOGMSG_INFO) !---------------- - ! Restart alarm + ! Stop alarm !---------------- - call NUOPC_CompAttributeGet(gcomp, name="restart_option", value=restart_option, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="stop_option", value=stop_option, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - call NUOPC_CompAttributeGet(gcomp, name="restart_n", value=cvalue, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="stop_n", value=cvalue, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - read(cvalue,*) restart_n + read(cvalue,*) stop_n - call NUOPC_CompAttributeGet(gcomp, name="restart_ymd", value=cvalue, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="stop_ymd", value=cvalue, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - read(cvalue,*) restart_ymd + read(cvalue,*) stop_ymd - call alarmInit(mclock, restart_alarm, restart_option, & - opt_n = restart_n, & - opt_ymd = restart_ymd, & + call alarmInit(mclock, stop_alarm, stop_option, & + opt_n = stop_n, & + opt_ymd = stop_ymd, & RefTime = mcurrTime, & - alarmname = 'alarm_restart', rc=rc) + alarmname = 'alarm_stop', rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - call ESMF_AlarmSet(restart_alarm, clock=mclock, rc=rc) + call ESMF_AlarmSet(stop_alarm, clock=mclock, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return !---------------- - ! Stop alarm + ! Restart alarm !---------------- - call NUOPC_CompAttributeGet(gcomp, name="stop_option", value=stop_option, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="restart_option", value=restart_option, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - call NUOPC_CompAttributeGet(gcomp, name="stop_n", value=cvalue, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="restart_n", value=cvalue, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - read(cvalue,*) stop_n + read(cvalue,*) restart_n - call NUOPC_CompAttributeGet(gcomp, name="stop_ymd", value=cvalue, rc=rc) + call NUOPC_CompAttributeGet(gcomp, name="restart_ymd", value=cvalue, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - read(cvalue,*) stop_ymd + read(cvalue,*) restart_ymd - call alarmInit(mclock, stop_alarm, stop_option, & - opt_n = stop_n, & - opt_ymd = stop_ymd, & + call alarmInit(mclock, restart_alarm, restart_option, & + opt_n = restart_n, & + opt_ymd = restart_ymd, & RefTime = mcurrTime, & - alarmname = 'alarm_stop', rc=rc) + alarmname = 'alarm_restart', rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return - call ESMF_AlarmSet(stop_alarm, clock=mclock, rc=rc) + call ESMF_AlarmSet(restart_alarm, clock=mclock, rc=rc) if (ChkErr(rc,__LINE__,u_FILE_u)) return + end if !-------------------------------- diff --git a/src/dyn_subgrid/test/dynConsBiogeophys_test/CMakeLists.txt b/src/dyn_subgrid/test/dynConsBiogeophys_test/CMakeLists.txt index 5e981270a4..da9c27090c 100644 --- a/src/dyn_subgrid/test/dynConsBiogeophys_test/CMakeLists.txt +++ b/src/dyn_subgrid/test/dynConsBiogeophys_test/CMakeLists.txt @@ -3,4 +3,4 @@ set(pfunit_sources add_pfunit_ctest(dynConsBiogeophys TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/dyn_subgrid/test/dynInitColumns_test/CMakeLists.txt b/src/dyn_subgrid/test/dynInitColumns_test/CMakeLists.txt index 7952f66756..0adbd696ad 100644 --- a/src/dyn_subgrid/test/dynInitColumns_test/CMakeLists.txt +++ b/src/dyn_subgrid/test/dynInitColumns_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(dynInitColumns TEST_SOURCES "test_init_columns.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/dyn_subgrid/test/dynTimeInfo_test/CMakeLists.txt b/src/dyn_subgrid/test/dynTimeInfo_test/CMakeLists.txt index 66f2027c36..625ddae91b 100644 --- a/src/dyn_subgrid/test/dynTimeInfo_test/CMakeLists.txt +++ b/src/dyn_subgrid/test/dynTimeInfo_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(dynTimeInfo TEST_SOURCES "test_dynTimeInfo.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/dyn_subgrid/test/dynVar_test/CMakeLists.txt b/src/dyn_subgrid/test/dynVar_test/CMakeLists.txt index fc4cf07b30..7164947f1e 100644 --- a/src/dyn_subgrid/test/dynVar_test/CMakeLists.txt +++ b/src/dyn_subgrid/test/dynVar_test/CMakeLists.txt @@ -9,4 +9,4 @@ set (extra_sources add_pfunit_ctest(dynVar TEST_SOURCES "${pfunit_sources}" OTHER_SOURCES "${extra_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/fates b/src/fates index e3e7d2cd86..296e1d6a45 160000 --- a/src/fates +++ b/src/fates @@ -1 +1 @@ -Subproject commit e3e7d2cd86a66f8ca0e8f6dc4a823246a2bdb95b +Subproject commit 296e1d6a45f05a800073d376286d0537d2290e96 diff --git a/src/main/clm_initializeMod.F90 b/src/main/clm_initializeMod.F90 index e3d9eeda06..46353539ce 100644 --- a/src/main/clm_initializeMod.F90 +++ b/src/main/clm_initializeMod.F90 @@ -125,12 +125,13 @@ subroutine initialize1(dtime) end subroutine initialize1 !----------------------------------------------------------------------- - subroutine initialize2(ni,nj) + subroutine initialize2(ni,nj, currtime) ! ! !DESCRIPTION: ! CLM initialization second phase ! ! !USES: + use ESMF , only : ESMF_Time use clm_varcon , only : spval use clm_varpar , only : natpft_lb, natpft_ub, cft_lb, cft_ub, maxpatch_glc use clm_varpar , only : surfpft_lb, surfpft_ub @@ -186,6 +187,7 @@ subroutine initialize2(ni,nj) ! ! !ARGUMENTS integer, intent(in) :: ni, nj ! global grid sizes + type(ESMF_Time), intent(in) :: currtime ! ! !LOCAL VARIABLES: integer :: c,g,i,j,k,l,n,p ! indices @@ -345,10 +347,12 @@ subroutine initialize2(ni,nj) source=create_nutrient_competition_method(bounds_proc)) call readParameters(photosyns_inst) + ! Initialize time manager if (nsrest == nsrStartup) then call timemgr_init() else + call timemgr_init(curr_date_in=currtime) call restFile_getfile(file=fnamer, path=pnamer) call restFile_open( flag='read', file=fnamer, ncid=ncid ) call timemgr_restart_io( ncid=ncid, flag='read' ) diff --git a/src/main/controlMod.F90 b/src/main/controlMod.F90 index 3f5c58ac0e..e8121519aa 100644 --- a/src/main/controlMod.F90 +++ b/src/main/controlMod.F90 @@ -119,6 +119,7 @@ subroutine control_init(dtime) ! ! !USES: use CNMRespMod , only : CNMRespReadNML + use CNFUNMod , only : CNFUNReadNML use CNNDynamicsMod , only : CNNDynamicsReadNML use CNPhenologyMod , only : CNPhenologyReadNML use landunit_varcon , only : max_lunit @@ -596,6 +597,7 @@ subroutine control_init(dtime) if ( use_fun ) then call CNMRespReadNML( NLFilename ) + call CNFUNReadNML( NLFilename ) end if call soilHydReadNML( NLFilename ) diff --git a/src/main/restFileMod.F90 b/src/main/restFileMod.F90 index c7dbf0da72..d82505f4ff 100644 --- a/src/main/restFileMod.F90 +++ b/src/main/restFileMod.F90 @@ -6,13 +6,13 @@ module restFileMod ! ! !USES: #include "shr_assert.h" - use shr_kind_mod , only : r8 => shr_kind_r8 + use shr_kind_mod , only : r8 => shr_kind_r8, CL=>shr_kind_CL use decompMod , only : bounds_type, get_proc_clumps, get_clump_bounds use decompMod , only : bounds_level_proc use spmdMod , only : masterproc, mpicom use abortutils , only : endrun use shr_log_mod , only : errMsg => shr_log_errMsg - use clm_time_manager , only : timemgr_restart_io, get_nstep + use clm_time_manager , only : timemgr_restart_io, get_nstep, get_curr_date use subgridRestMod , only : subgridRestWrite, subgridRestRead, subgridRest_read_cleanup use accumulMod , only : accumulRest use clm_instMod , only : clm_instRest @@ -340,6 +340,7 @@ subroutine restFile_read_pfile( pnamer ) ! !USES: use fileutils , only : opnfil, getavu, relavu use clm_varctl, only : rpntfil, rpntdir, inst_suffix + use mpi, only : MPI_CHARACTER ! ! !ARGUMENTS: character(len=*), intent(out) :: pnamer ! full path of restart file @@ -347,8 +348,11 @@ subroutine restFile_read_pfile( pnamer ) ! !LOCAL VARIABLES: !EOP integer :: i ! indices + integer :: yr, mon, day, tod + character(len=17) :: timestamp integer :: nio ! restart unit integer :: status ! substring check status + logical :: found character(len=256) :: locfn ! Restart pointer file name !----------------------------------------------------------------------- @@ -359,17 +363,24 @@ subroutine restFile_read_pfile( pnamer ) ! New history files are always created for branch runs. if (masterproc) then - write(iulog,*) 'Reading restart pointer file....' + nio = getavu() + call get_curr_date(yr, mon, day, tod) + write(timestamp,'(".",i4.4,"-",i2.2,"-",i2.2,"-",i5.5)') yr,mon,day,tod + locfn = trim(rpntdir) //'/'// trim(rpntfil)//trim(inst_suffix)//timestamp + inquire(file=trim(locfn), exist=found) + if(.not. found) then + locfn = trim(rpntdir) //'/'// trim(rpntfil)//trim(inst_suffix) + endif + write(iulog,*) 'Reading restart pointer file: ',trim(locfn) + + call opnfil (locfn, nio, 'f') + read (nio,'(a256)') pnamer + call relavu (nio) endif - - nio = getavu() - locfn = trim(rpntdir) //'/'// trim(rpntfil)//trim(inst_suffix) - call opnfil (locfn, nio, 'f') - read (nio,'(a256)') pnamer - call relavu (nio) + call mpi_bcast (pnamer, CL, MPI_CHARACTER, 0, mpicom, status) if (masterproc) then - write(iulog,*) 'Reading restart data.....' + write(iulog,*) 'Reading restart data: ',trim(pnamer) write(iulog,'(72a1)') ("-",i=1,60) end if @@ -422,12 +433,16 @@ subroutine restFile_write_pfile( fnamer ) ! !LOCAL VARIABLES: integer :: m ! index integer :: nio ! restart pointer file + integer :: yr, mon, day, tod + character(len=17) :: timestamp character(len=256) :: filename ! local file name !----------------------------------------------------------------------- if (masterproc) then + call get_curr_date(yr, mon, day, tod) + write(timestamp,'(".",i4.4,"-",i2.2,"-",i2.2,"-",i5.5)') yr, mon, day, tod nio = getavu() - filename= trim(rpntdir) //'/'// trim(rpntfil)//trim(inst_suffix) + filename= trim(rpntdir) //'/'// trim(rpntfil)//trim(inst_suffix)//timestamp call opnfil( filename, nio, 'f' ) write(nio,'(a)') fnamer @@ -466,7 +481,7 @@ subroutine restFile_open( flag, file, ncid ) ! Open netcdf restart file if (masterproc) then - write(iulog,*) 'Reading restart dataset' + write(iulog,*) 'Reading restart dataset: ', trim(file) end if call ncd_pio_openfile (ncid, trim(file), 0) diff --git a/src/main/test/accumul_test/CMakeLists.txt b/src/main/test/accumul_test/CMakeLists.txt index 0b06d9e87e..8d7cf69f1c 100644 --- a/src/main/test/accumul_test/CMakeLists.txt +++ b/src/main/test/accumul_test/CMakeLists.txt @@ -3,4 +3,4 @@ set(pfunit_sources add_pfunit_ctest(accumul TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/main/test/atm2lnd_test/CMakeLists.txt b/src/main/test/atm2lnd_test/CMakeLists.txt index 51c4732205..fcc4159ce2 100644 --- a/src/main/test/atm2lnd_test/CMakeLists.txt +++ b/src/main/test/atm2lnd_test/CMakeLists.txt @@ -4,4 +4,4 @@ set(pfunit_sources add_pfunit_ctest(atm2lnd TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/main/test/initVertical_test/CMakeLists.txt b/src/main/test/initVertical_test/CMakeLists.txt index 8fe9648a50..aec45772c4 100644 --- a/src/main/test/initVertical_test/CMakeLists.txt +++ b/src/main/test/initVertical_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(initVertical TEST_SOURCES "test_initVertical.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/self_tests/test/assertions_test/CMakeLists.txt b/src/self_tests/test/assertions_test/CMakeLists.txt index d36d8c7675..aeae976839 100644 --- a/src/self_tests/test/assertions_test/CMakeLists.txt +++ b/src/self_tests/test/assertions_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(assertions TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/soilbiogeochem/test/tillage_test/CMakeLists.txt b/src/soilbiogeochem/test/tillage_test/CMakeLists.txt index fbc550dd03..13be9aee3e 100644 --- a/src/soilbiogeochem/test/tillage_test/CMakeLists.txt +++ b/src/soilbiogeochem/test/tillage_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(tillage TEST_SOURCES "test_tillage.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/utils/SparseMatrixMultiplyMod.F90 b/src/utils/SparseMatrixMultiplyMod.F90 index 5ea9848373..564da21cc2 100644 --- a/src/utils/SparseMatrixMultiplyMod.F90 +++ b/src/utils/SparseMatrixMultiplyMod.F90 @@ -1217,7 +1217,7 @@ subroutine SPMP_ABC(this,num_unit,filter_u,A,B,C,list_ready,list_A,list_B,list_C call endrun( subname//" ERROR: missing required optional arguments" ) return end if - SHR_ASSERT_FL((size(filter_actunit_A) > num_actunit_A), sourcefile, __LINE__) + SHR_ASSERT_FL((size(filter_actunit_A) >= num_actunit_A), sourcefile, __LINE__) end if if(present(num_actunit_B))then if(num_actunit_B < 0)then @@ -1230,7 +1230,7 @@ subroutine SPMP_ABC(this,num_unit,filter_u,A,B,C,list_ready,list_A,list_B,list_C call endrun( subname//" ERROR: missing required optional arguments" ) return end if - SHR_ASSERT_FL((size(filter_actunit_B) > num_actunit_B), sourcefile, __LINE__) + SHR_ASSERT_FL((size(filter_actunit_B) >= num_actunit_B), sourcefile, __LINE__) end if if(present(num_actunit_C))then if(num_actunit_C < 0)then @@ -1243,7 +1243,7 @@ subroutine SPMP_ABC(this,num_unit,filter_u,A,B,C,list_ready,list_A,list_B,list_C call endrun( subname//" ERROR: missing required optional arguments" ) return end if - SHR_ASSERT_FL((size(filter_actunit_C) > num_actunit_C), sourcefile, __LINE__) + SHR_ASSERT_FL((size(filter_actunit_C) >= num_actunit_C), sourcefile, __LINE__) end if if(.not. list_ready)then diff --git a/src/utils/clm_time_manager.F90 b/src/utils/clm_time_manager.F90 index 955d98057a..b0bcef0691 100644 --- a/src/utils/clm_time_manager.F90 +++ b/src/utils/clm_time_manager.F90 @@ -177,7 +177,8 @@ end subroutine set_timemgr_init !========================================================================================= - subroutine timemgr_init( ) + subroutine timemgr_init(curr_date_in ) + type(ESMF_Time), intent(in), optional :: curr_date_in !--------------------------------------------------------------------------------- ! Initialize the ESMF time manager from the sync clock @@ -187,8 +188,8 @@ subroutine timemgr_init( ) character(len=*), parameter :: sub = 'clm::timemgr_init' integer :: rc ! return code type(ESMF_Time) :: start_date ! start date for run - type(ESMF_Time) :: curr_date ! temporary date used in logic type(ESMF_Time) :: ref_date ! reference date for time coordinate + type(ESMF_Time) :: curr_date ! temporary date used in logic type(ESMF_TimeInterval) :: day_step_size ! day step size type(ESMF_TimeInterval) :: step_size ! timestep size !--------------------------------------------------------------------------------- @@ -211,8 +212,11 @@ subroutine timemgr_init( ) start_date = TimeSetymd( start_ymd, start_tod, "start_date" ) ! Initialize current date - - curr_date = start_date + if(present(curr_date_in)) then + curr_date = curr_date_in + else + curr_date = start_date + endif call ESMF_TimeIntervalSet( step_size, s=dtime, rc=rc ) call chkrc(rc, sub//': error return from ESMF_TimeIntervalSet: setting step_size') @@ -253,7 +257,7 @@ subroutine init_clock( start_date, ref_date, curr_date ) !--------------------------------------------------------------------------------- ! Purpose: Initialize the clock based on the start_date, ref_date and curr_date ! - use ESMF , only : ESMF_ClockCreate, ESMF_ClockAdvance + use ESMF , only : ESMF_ClockCreate, ESMF_ClockAdvance, esmf_clockiscreated type(ESMF_Time), intent(in) :: start_date ! start date for run type(ESMF_Time), intent(in) :: ref_date ! reference date for time coordinate @@ -277,6 +281,7 @@ subroutine init_clock( start_date, ref_date, curr_date ) ! manager included in cime appears to require stopTime. call ESMF_TimeSet(stop_date, yy=really_big_year, mm=12, dd=31, s=0, & calendar=tm_cal, rc=rc) + call chkrc(rc, sub//': error return from ESMF_TimeIntervalSet: setting step_size') ! Error check @@ -299,9 +304,10 @@ subroutine init_clock( start_date, ref_date, curr_date ) ! Initialize the clock + tm_clock = ESMF_ClockCreate(name="CLM Time-manager clock", timeStep=step_size, startTime=start_date, & stopTime=stop_date, refTime=ref_date, rc=rc) - call chkrc(rc, sub//': error return from ESMF_ClockSetup') + call chkrc(rc, sub//': error return from ESMF_ClockCreate') ! Advance clock to the current time (in case of a restart) @@ -496,11 +502,12 @@ end subroutine timemgr_restart_io !========================================================================================= - subroutine timemgr_restart( ) + subroutine timemgr_restart() !--------------------------------------------------------------------------------- ! Restart the ESMF time manager using the synclock for ending date. ! + character(len=*), parameter :: sub = 'clm::timemgr_restart' integer :: rc ! return code integer :: yr, mon, day, tod ! Year, month, day, and second as integers @@ -520,16 +527,15 @@ subroutine timemgr_restart( ) dtime = rst_step_sec - ! Initialize start date from restart info - - start_date = TimeSetymd( rst_start_ymd, rst_start_tod, "start_date" ) + ! Check start date from restart info - ! Initialize current date from restart info + if (rst_start_ymd .ne. start_ymd .or. rst_start_tod .ne. start_tod) then + call shr_sys_abort(sub//'ERROR: mismatch in start date with restart file') + endif - curr_date = TimeSetymd( rst_curr_ymd, rst_curr_tod, "curr_date" ) - - call ESMF_TimeIntervalSet( step_size, s=dtime, rc=rc ) - call chkrc(rc, sub//': error return from ESMF_TimeIntervalSet: setting step_size') + if (rst_ref_ymd .ne. ref_ymd .or. rst_ref_tod .ne. ref_tod) then + call shr_sys_abort(sub//'ERROR: mismatch in reference date with restart file') + endif call ESMF_TimeIntervalSet( day_step_size, d=1, rc=rc ) call chkrc(rc, sub//': error return from ESMF_TimeIntervalSet: setting day_step_size') @@ -540,12 +546,6 @@ subroutine timemgr_restart( ) ! Initialize ref date from restart info - ref_date = TimeSetymd( rst_ref_ymd, rst_ref_tod, "ref_date" ) - - ! Initialize clock - - call init_clock( start_date, ref_date, curr_date) - ! Advance the timestep. ! Data from the restart file corresponds to the last timestep of the previous run. diff --git a/src/utils/test/annual_flux_dribbler_test/CMakeLists.txt b/src/utils/test/annual_flux_dribbler_test/CMakeLists.txt index a0a60e7431..01efdc1e50 100644 --- a/src/utils/test/annual_flux_dribbler_test/CMakeLists.txt +++ b/src/utils/test/annual_flux_dribbler_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(annual_flux_dribbler TEST_SOURCES "test_annual_flux_dribbler.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/utils/test/array_utils_test/CMakeLists.txt b/src/utils/test/array_utils_test/CMakeLists.txt index 21c7d91d81..a6b36304b4 100644 --- a/src/utils/test/array_utils_test/CMakeLists.txt +++ b/src/utils/test/array_utils_test/CMakeLists.txt @@ -5,4 +5,4 @@ set (pfunit_sources add_pfunit_ctest(array_utils TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/utils/test/clm_time_manager_test/CMakeLists.txt b/src/utils/test/clm_time_manager_test/CMakeLists.txt index f34e77dfc9..66a62e665d 100644 --- a/src/utils/test/clm_time_manager_test/CMakeLists.txt +++ b/src/utils/test/clm_time_manager_test/CMakeLists.txt @@ -1,3 +1,3 @@ add_pfunit_ctest(clm_time_manager TEST_SOURCES "test_clm_time_manager.pf" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/src/utils/test/numerics_test/CMakeLists.txt b/src/utils/test/numerics_test/CMakeLists.txt index 19d2c67451..2e826e2018 100644 --- a/src/utils/test/numerics_test/CMakeLists.txt +++ b/src/utils/test/numerics_test/CMakeLists.txt @@ -3,4 +3,4 @@ set (pfunit_sources add_pfunit_ctest(numerics TEST_SOURCES "${pfunit_sources}" - LINK_LIBRARIES clm csm_share esmf_wrf_timemgr) + LINK_LIBRARIES clm csm_share esmf) diff --git a/tools/mksurfdata_esmf/Makefile b/tools/mksurfdata_esmf/Makefile index 7ad8e1aa77..8dee6db596 100644 --- a/tools/mksurfdata_esmf/Makefile +++ b/tools/mksurfdata_esmf/Makefile @@ -79,10 +79,13 @@ SUBSETDATA_1X1_URBALPHA := --lat -37.7308 --lon 0 --site 1x1_urbanc_alpha --o # low-res is for low resolutions for testing # nldas is for NWP working with WRF # STANDARD means no crop, so 16 pfts +# global-hist-1850-f45 is used by FATES and we expect it to be phased out STANDARD = \ global-potveg \ global-present \ global-present-low-res \ + global-hist-1850-f19 \ + global-hist-1850-f45 \ CROP = \ crop-global-future \ @@ -153,6 +156,12 @@ global-present-low-res : FORCE $(MKSURFDATA) --number-of-nodes 1 --tasks-per-node 64 --scenario $@ --jobscript-file $@.sh --walltime 01:00:00 $(BATCHJOBS) $@.sh +global-hist-1850-f19 : FORCE + $(MKSURFDATA) --number-of-nodes 8 --scenario $@ --jobscript-file $@.sh --walltime 12:00:00 + $(BATCHJOBS) $@.sh +global-hist-1850-f45 : FORCE + $(MKSURFDATA) --number-of-nodes 2 --scenario $@ --jobscript-file $@.sh --walltime 12:00:00 + $(BATCHJOBS) $@.sh # # Ultra high resolutions (Don't do by default user should select this by hand) # diff --git a/tools/site_and_regional/neon_gcs_upload b/tools/site_and_regional/neon_gcs_upload index 40afef8e74..1c931e3b8d 100755 --- a/tools/site_and_regional/neon_gcs_upload +++ b/tools/site_and_regional/neon_gcs_upload @@ -126,7 +126,7 @@ def main(description): #os.path.join(os.environ["HOME"],"gcwriter") # Get the list of supported neon sites from usermods - valid_neon_sites = glob.glob(os.path.join(cesmroot,"cime_config","usermods_dirs","NEON","[!d]*")) + valid_neon_sites = glob.glob(os.path.join(cesmroot,"cime_config","usermods_dirs","clm","NEON","[!d]*")) valid_neon_sites = [v.split('/')[-1] for v in valid_neon_sites] filedatestamp = datetime.datetime.now().date() site_list, output_root, file_date, upload_finidat, upload_history = get_parser(sys.argv, description, valid_neon_sites)