Skip to content

Commit f8daa56

Browse files
nusbaumeCourtney Peverleypeverwheehplin-ucarjimmielin
authored
Implement CAM4 aquaplanet (QPC4) configuration (#460)
Tag name (required for release branches): sima0_11_000 Originator(s): nusbaume Description (include the issue title, and the keyword ['closes', 'fixes', 'resolves'] followed by the issue number): Add updates and modifications needed to run the CAM4 aquaplanet configuration with prescribed SSTs (QPC4), at least with the MPAS dycore. This includes replacing the FCAM4 test with a QPC4 test. Also updates the externals (submodules) and git-fleximod version to match cam6_4_143. Describe any changes made to build system: M cime_config/cam_config.py - Add 'aquaplanet' config option and remove unused 'ocn' option, and add nitrogen deposition namelist. M cime_config/config_component.xml - Make sure the 'aquaplanet' configuration is properly set based off the compset entry. M cime_config/config_pes.xml - Update file to match cam6_4_143 M src/data/generate_registry_data.py - Ensure that CAM-SIMA uses the correct number of CCPP constituents when allocating variables in the registry. Describe any changes made to the namelist: A cime_config/usermods_dirs/aquap/user_nl_cpl M cime_config/namelist_definition_cam.xml M src/data/namelist_definition_physconst.xml - Add modifications needed for CAM4 aquaplanet configurations with the MPAS dycore, and update ParamGen XML version where applicable. M src/data/namelist_definition_ref_pres.xml M src/dynamics/mpas/namelist_definition_mpas_dycore.xml M src/dynamics/se/namelist_definition_se_dycore.xml M src/dynamics/tests/namelist_definition_analy_ic.xml - Update ParamGen XML version. List any changes to the defaults for the input datasets (e.g. boundary datasets): N/A List all files eliminated and why: D components/cism - The CISM submodule was removed from CAM, so removing it here as well. List all files added and what they do: List all existing files that have been modified, and describe the changes: (Helpful git command: `git diff --name-status development...<your_branch_name>`) M .gitmodules M ccs_config M cime M components/cdeps M components/cice M components/cmeps M components/mizuRoute M share M tools/CUPiD - Update externals (git submodules) to match cam6_4_143. M src/physics/ncar_ccpp - Update atmospheric_physics submodule to point to branch with needed CAM4 modifications. M .lib/git-fleximod/.github/workflows/pytest.yaml M .lib/git-fleximod/.pre-commit-config.yaml M .lib/git-fleximod/CODE_OF_CONDUCT.md M .lib/git-fleximod/git_fleximod/cli.py M .lib/git-fleximod/git_fleximod/git_fleximod.py M .lib/git-fleximod/git_fleximod/gitinterface.py M .lib/git-fleximod/git_fleximod/gitmodules.py M .lib/git-fleximod/git_fleximod/metoflexi.py M .lib/git-fleximod/git_fleximod/submodule.py M .lib/git-fleximod/git_fleximod/utils.py M .lib/git-fleximod/poetry.lock M .lib/git-fleximod/pyproject.toml M .lib/git-fleximod/tbump.toml M .lib/git-fleximod/tests/conftest.py M .lib/git-fleximod/tests/test_a_import.py M .lib/git-fleximod/tests/test_b_update.py M .lib/git-fleximod/tests/test_c_required.py M .lib/git-fleximod/tests/test_d_complex.py M .lib/git-fleximod/tests/test_e_complex_update.py A .lib/git-fleximod/tests/utils_for_tests.py - Update git-fleximod version to match cam6_4_143. M cime_config/testdefs/testlist_cam.xml R100 cime_config/testdefs/testmods_dirs/cam/outfrq_se_cslam_analy_ic_cam4/shell_commands cime_config/testdefs/testmods_dirs/cam/outfrq_analy_ic_cam4/shell_commands R100 cime_config/testdefs/testmods_dirs/cam/outfrq_se_cslam_analy_ic_cam4/user_nl_cam cime_config/testdefs/testmods_dirs/cam/outfrq_analy_ic_cam4/user_nl_cam - Replace FCAM4 with QPC4 test using MPAS dycore and analytic ICs. M src/control/runtime_opts.F90 - Add Nitrogen deposition namelist read, and remove all other commented-out subroutine calls. M src/cpl/nuopc/atm_comp_nuopc.F90 M src/cpl/nuopc/atm_import_export.F90 - Update NUOPC coupling layer to allow for the exchange of variables between CAM-SIMA and the coupler, at least when running in a CAM4 aquaplanet configuration. M src/cpl/nuopc/atm_stream_ndep.F90 - Clean-up use statements, and ensure that the subroutines build and run correctly when in a CAM4 aquaplanet configruation. M src/dynamics/mpas/dyn_comp_impl.F90 M src/dynamics/mpas/dyn_coupling_impl.F90 - Ensure that advected constituents are handled correctly when non-advected constituents also exist. M src/physics/utils/cam_constituents.F9 - Add "is_advected" check, and print out the names of all registered constituents to the atm log file. M src/physics/utils/phys_comp.F90 - Ensure that the IC file is only read once for non-null dycore runs. M src/physics/utils/physics_data.F90 - Add additional log output, and namelist controls for certain other log outputs. M src/physics/utils/pio_reader.F90 - Make sure output strings are trimmed. M test/unit/python/sample_files/physics_types_complete.F90 M test/unit/python/test_cam_config.py - Update unit tests to properly handle code changes from this PR. If there are new failures (compared to the `test/existing-test-failures.txt` file), have them OK'd by the gatekeeper, note them here, and add them to the file. If there are baseline differences, include the test and the reason for the diff. What is the nature of the change? Roundoff? derecho/intel/aux_sima: Most tests have NLCOMP failures due to the PE layout changes and the addition of the nitrogen deposition namelist. SMS_Ln9.mpasa120_mpasa120.QPC4.derecho_intel.cam-outfrq_analy_ic_cam4 - New regression test (no baselines). SMS_Ln9.ne3pg3_ne3pg3_mg37.FKESSLER.derecho_intel.cam-outfrq_se_cslam_multitape (Overall: NLFAIL) - Expected failure. derecho/gnu/aux_sima: Most tests have NLCOMP failures due to the PE layout changes and the addition of the nitrogen deposition namelist. SMS_Ln9.mpasa120_mpasa120.QPC4.derecho_gnu.cam-outfrq_analy_ic_cam4 (Overall: DIFF) - New regression test (no baselines). SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_hb_vdiff_derecho (Overall: DIFF) - Answer changes due to new sponge layer properties from ESCOMP/atmospheric_physics#348 If this changes climate describe any run(s) done to evaluate the new climate in enough detail that it(they) could be reproduced: Changes climate for CAM4 aquaplanet runs with the MPAS dycore, prescribed SSTs, and analytic ICs. CAM-SIMA date used for the baseline comparison tests if different than latest: --------- Co-authored-by: Courtney Peverley <courtneyp@izumi.cgd.ucar.edu> Co-authored-by: peverwhee <courtneyp@ucar.edu> Co-authored-by: Haipeng Lin <hplin@ucar.edu> Co-authored-by: Haipeng Lin <myself@jimmielin.me>
1 parent 8ad34dd commit f8daa56

59 files changed

Lines changed: 3328 additions & 2376 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[submodule "ncar-physics"]
2121
path = src/physics/ncar_ccpp
2222
url = https://github.com/ESCOMP/atmospheric_physics
23-
fxtag = atmos_phys0_20_000
23+
fxtag = b47246dedfa7c377ac2bfb060e2d465beb931f2a
2424
fxrequired = AlwaysRequired
2525
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics
2626
[submodule "rrtmgp-data"]
@@ -32,33 +32,27 @@
3232
[submodule "ccs_config"]
3333
path = ccs_config
3434
url = https://github.com/ESMCI/ccs_config_cesm.git
35-
fxtag = ccs_config_cesm1.0.61
35+
fxtag = ccs_config_cesm1.0.65
3636
fxrequired = ToplevelRequired
3737
fxDONOTUSEurl = https://github.com/ESMCI/ccs_config_cesm.git
3838
[submodule "cdeps"]
3939
path = components/cdeps
4040
url = https://github.com/ESCOMP/CDEPS.git
41-
fxtag = cdeps1.0.80
41+
fxtag = cdeps1.0.84
4242
fxrequired = ToplevelRequired
4343
fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git
4444
[submodule "cice"]
4545
path = components/cice
4646
url = https://github.com/ESCOMP/CESM_CICE
47-
fxtag = cesm3_cice6_6_0_13
47+
fxtag = cesm3_cice6_6_1_6
4848
fxrequired = ToplevelRequired
4949
fxDONOTUSEurl = https://github.com/ESCOMP/CESM_CICE
5050
[submodule "cime"]
5151
path = cime
5252
url = https://github.com/ESMCI/cime
53-
fxtag = cime6.1.126
53+
fxtag = cime6.1.145
5454
fxrequired = ToplevelRequired
5555
fxDONOTUSEurl = https://github.com/ESMCI/cime
56-
[submodule "cism"]
57-
path = components/cism
58-
url = https://github.com/ESCOMP/CISM-wrapper
59-
fxtag = cismwrap_2_2_010
60-
fxrequired = ToplevelRequired
61-
fxDONOTUSEurl = https://github.com/ESCOMP/CISM-wrapper
6256
[submodule "clm"]
6357
path = components/clm
6458
url = https://github.com/ESCOMP/CTSM
@@ -68,7 +62,7 @@
6862
[submodule "cmeps"]
6963
path = components/cmeps
7064
url = https://github.com/ESCOMP/CMEPS.git
71-
fxtag = cmeps1.1.16
65+
fxtag = cmeps1.1.24
7266
fxrequired = ToplevelRequired
7367
fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git
7468
[submodule "fms"]
@@ -80,7 +74,7 @@
8074
[submodule "mizuRoute"]
8175
path = components/mizuRoute
8276
url = https://github.com/ESCOMP/mizuRoute
83-
fxtag = v3.0.0
77+
fxtag = v3.0.1
8478
fxrequired = ToplevelRequired
8579
fxDONOTUSEurl = https://github.com/ESCOMP/mizuRoute
8680
[submodule "mosart"]
@@ -104,12 +98,12 @@
10498
[submodule "share"]
10599
path = share
106100
url = https://github.com/ESCOMP/CESM_share
107-
fxtag = share1.1.9
101+
fxtag = share1.1.16
108102
fxrequired = ToplevelRequired
109103
fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share
110104
[submodule "tools/CUPiD"]
111105
path = tools/CUPiD
112106
url = https://github.com/NCAR/CUPiD.git
113-
fxtag = v0.3.1
107+
fxtag = v0.4.0
114108
fxrequired = ToplevelRequired
115109
fxDONOTUSEurl = https://github.com/NCAR/CUPiD.git

.lib/git-fleximod/.github/workflows/pytest.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# reference the matrixe python version here.
1919
- uses: actions/setup-python@v5
2020
with:
21-
python-version: '3.9'
21+
python-version: '3.12'
2222

2323
# Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow
2424
# from installing Poetry every time, which can be slow. Note the use of the Poetry version
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/cache@v4
3030
with:
3131
path: ~/.local
32-
key: poetry-1.7.1
32+
key: poetry-1.8.2
3333

3434
# Install Poetry. You could do this manually, or there are several actions that do this.
3535
# `snok/install-poetry` seems to be minimal yet complete, and really just calls out to
@@ -42,7 +42,7 @@ jobs:
4242
# cache it.
4343
- uses: snok/install-poetry@v1
4444
with:
45-
version: 1.7.1
45+
version: 1.8.2
4646
virtualenvs-create: true
4747
virtualenvs-in-project: true
4848

@@ -73,5 +73,7 @@ jobs:
7373
- run: |
7474
git config --global user.name "${GITHUB_ACTOR}"
7575
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
76-
poetry run pytest
77-
76+
poetry run pytest --doctest-modules
77+
# - name: Setup tmate session
78+
# if: ${{ failure() }}
79+
# uses: mxschmitt/action-tmate@v3

.lib/git-fleximod/.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ exclude: ^utils/.*$
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.0.1
5+
rev: v6.0.0
66
hooks:
77
- id: end-of-file-fixer
88
- id: trailing-whitespace

.lib/git-fleximod/CODE_OF_CONDUCT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Examples of behaviors that contribute to a positive environment include:
1717
* Communicate openly with respect for others, critiquing ideas rather than individuals and gracefully accepting criticism
1818
* Acknowledging the contributions of others
1919
* Avoid personal attacks directed toward other participants
20-
* Be mindful of your surroundings and of your fellow participants
20+
* Be mindful of your surroundings and of your fellow participants
2121
* Alert UCAR staff and suppliers/vendors if you notice a dangerous situation or someone in distress
2222
* Respect the rules and policies of the project and venue
2323

@@ -29,7 +29,7 @@ Examples of unacceptable behavior include, but are not limited to:
2929
* Personal attacks directed at other guests, members, participants, etc.
3030
* Publishing others' private information, such as a physical or electronic address, without explicit permission
3131
* Alarming, intimidating, threatening, or hostile comments or conduct
32-
* Inappropriate use of nudity and/or sexual images
32+
* Inappropriate use of nudity and/or sexual images
3333
* Threatening or stalking anyone, including a participant
3434
* Other conduct which could reasonably be considered inappropriate in a professional setting
3535

@@ -60,7 +60,7 @@ the [Attribution](#attribution) section.
6060
## Reporting
6161
Instances of unacceptable behavior can be brought to the attention of the project administrator(s) who may take any action as
6262
outlined in the [Consequences](#consequences) section below.
63-
However, making a report to a project administrator is not considered an 'official report' to UCAR.
63+
However, making a report to a project administrator is not considered an 'official report' to UCAR.
6464

6565
Instances of unacceptable behavior may also be reported directly to UCAR pursuant to [UCAR's Harassment Reporting and Complaint
6666
Procedure](https://www2.fin.ucar.edu/procedures/hr/harassment-reporting-and-complaint-procedure), or anonymously through [UCAR's

.lib/git-fleximod/git_fleximod/cli.py

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from pathlib import Path
22
import argparse, os, sys
3-
from git_fleximod import utils
43

5-
__version__ = "1.0.3"
4+
__version__ = "1.1.1"
5+
66

77
class CustomArgumentParser(argparse.ArgumentParser):
88
def print_help(self, file=None):
@@ -17,13 +17,28 @@ def print_help(self, file=None):
1717
for path in candidate_paths:
1818
if os.path.exists(path):
1919
with open(path) as f:
20-
print( f.read(), file=file)
20+
print(f.read(), file=file)
2121
return
22-
print( "README.md not found.", file=file)
22+
print("README.md not found.", file=file)
23+
2324

2425
def find_root_dir(filename=".gitmodules"):
25-
""" finds the highest directory in tree
26-
which contains a file called filename """
26+
"""
27+
Finds the highest directory in tree which contains a file called filename.
28+
29+
>>> import tempfile, os
30+
>>> cwd = os.getcwd()
31+
>>> with tempfile.TemporaryDirectory() as tmp:
32+
... subdir = Path(tmp) / 'subdir'
33+
... subdir.mkdir()
34+
... f = Path(tmp) / '.gitmodules'
35+
... _ = f.write_text('')
36+
... os.chdir(subdir)
37+
... result = find_root_dir('.gitmodules') == str(tmp)
38+
... os.chdir(cwd)
39+
... result
40+
True
41+
"""
2742
d = Path.cwd()
2843
root = Path(d.root)
2944
dirlist = []
@@ -40,6 +55,7 @@ def find_root_dir(filename=".gitmodules"):
4055
return str(dl)
4156
return None
4257

58+
4359
def get_parser():
4460
description = """
4561
%(prog)s manages checking out groups of gitsubmodules with additional support for Earth System Models
@@ -116,6 +132,13 @@ def get_parser():
116132
"verbosity level each time.",
117133
)
118134

135+
parser.add_argument(
136+
"--no-mods-details",
137+
action="store_true",
138+
default=False,
139+
help="Suppress details on local mods in status output.",
140+
)
141+
119142
parser.add_argument(
120143
"-V",
121144
"--version",

0 commit comments

Comments
 (0)