Skip to content
Merged
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
bf059a4
Adds a broadcast of the namelist value (urbantvmapalgo) after reading…
briandobbins May 9, 2024
9ad21e2
Update ChangeLog and ChangeSum.
samsrabin May 2, 2024
baa70a9
Provide scalar cth and cbh in unit tests. Failing.
samsrabin May 6, 2024
af6443a
Ensure cth and cbh are iterable before zipping. Unit tests now pass.
samsrabin May 6, 2024
b65af4c
Move ensure_iterable() to utils.py and add testing. One failure.
samsrabin May 6, 2024
73f5520
ensure_iterable() now errors if already iterable but wrong length. Te…
samsrabin May 6, 2024
1461f9c
Clean up ctsm/utils.py with black and pylint.
samsrabin May 6, 2024
2443bd2
Add previous commit to .git-blame-ignore-revs.
samsrabin May 6, 2024
3780111
Adds a broadcast of the namelist value (urbantvmapalgo) after reading…
briandobbins May 9, 2024
1738156
Merge remote-tracking branch 'escomp/b4b-dev' into fix_urbantvmapalgo…
samsrabin Oct 8, 2024
957d032
Merge branch 'b4b-dev' into fix_urbantvmapalgo_broadcast
ekluzek Dec 4, 2024
f4fc6bd
Merge branch 'fix_urbantvmapalgo_broadcast' of github.com:briandobbin…
ekluzek Dec 11, 2024
a1765aa
Merge branch 'ESCOMP:master' into fix_urbantvmapalgo_broadcast
briandobbins Jan 22, 2025
3360409
Adds the 'redist' method for the urban time-varying data, which is cu…
briandobbins Jan 22, 2025
64c7006
Merge remote-tracking branch 'escomp/b4b-dev' into fix_urbantvmapalgo…
ekluzek Apr 24, 2025
e729ff6
Start the update of using the NUOPC CDEPS options for streams rather …
ekluzek May 4, 2025
9d5d2ec
Start adding a test for obscure mapping to make sure stream namelist …
ekluzek May 4, 2025
8c5666d
Merge branch 'fix_urbantvmapalgo_broadcast' of github.com:briandobbin…
ekluzek Jun 2, 2025
8a9e312
Isoprene soil moisture options
fvitt Jul 7, 2025
36edc66
Move the gamma_sm options from CMEPS to CTSM
fvitt Jul 8, 2025
a730529
Fix a self-test
billsacks Jul 9, 2025
3fe73bc
Merge branch 'b4b-dev' into fix_self_tests
ekluzek Jul 9, 2025
e76985f
Merge tag 'ctsm5.3.063' into merge-master-20250710
samsrabin Jul 10, 2025
0a1a450
Merge pull request #3327 from samsrabin/merge-master-20250710
samsrabin Jul 10, 2025
284bee1
Remove flexCN_FUN_BNF test and testmods as redundant
slevis-lmwg Jul 11, 2025
65aabbd
Update submodules to cesm3_0_alpha07b versions taking care of the bul…
ekluzek Jul 14, 2025
da587af
Merge pull request #3329 from slevis-lmwg/redundant_bnf_tests
slevis-lmwg Jul 15, 2025
9cd8cbe
Update mosart and rtm to latest with the history a/i fix in place
ekluzek Jul 15, 2025
1768e25
Update cdeps with two helpful changes, 512 filelength and rpointer fix
ekluzek Jul 15, 2025
ddf402c
Remove older versions of scripts
olyson Jul 16, 2025
4b965a2
New versions of SpinupStability and run_clm_historical scripts
olyson Jul 16, 2025
e8ec878
Update tools/contrib README
olyson Jul 16, 2025
60e2a85
Merge remote-tracking branch 'escomp/b4b-dev' into update_submodules_…
ekluzek Jul 16, 2025
2918954
Merge pull request #3338 from olyson/b4b-dev_contrib_scripts
ekluzek Jul 16, 2025
ff30b0a
Merge branch 'b4b-dev' into fix_urbantvmapalgo_broadcast
ekluzek Jul 16, 2025
0f0ecf0
Merge remote-tracking branch 'escomp/b4b-dev' into isop_sm_factor
ekluzek Jul 16, 2025
59ea84a
Remove the default setting, as we will be setting it explicitly in th…
ekluzek Jul 16, 2025
72da7c6
Correct the number of tests and fix the new urbantvmapalgo test
ekluzek Jul 16, 2025
11c508d
Add other namelist mapalgo settings to the tests
ekluzek Jul 16, 2025
b1098e7
Turn megan soil moisture effect off, which will change answers from c…
ekluzek Jul 16, 2025
07bd1c5
Fix test numbers
ekluzek Jul 16, 2025
36cfa48
Now turn to true so answers are replicated
ekluzek Jul 17, 2025
857a371
Merge remote-tracking branch 'escomp/b4b-dev' into update_submodules_…
ekluzek Jul 22, 2025
13f896b
Update/harmonize versions of GH actions checkout, setup-python.
samsrabin Jul 22, 2025
2ea63ac
GH actions: Specify SHAs for all external actions.
samsrabin Jul 22, 2025
804d178
Reduce permissions for build-image-and-test-docs.
samsrabin Jul 22, 2025
d075ae5
Bump docs container version.
samsrabin Jul 22, 2025
d708ed1
Merge pull request #3343 from samsrabin/action-hardening
samsrabin Jul 22, 2025
19946f6
Merge pull request #3334 from ekluzek/update_submodules_to_cesm30a7b
ekluzek Jul 22, 2025
0ee9565
Merge remote-tracking branch 'escomp/b4b-dev' into fix_urbantvmapalgo…
ekluzek Jul 22, 2025
01f457a
Correct the names for the conservative remapping
ekluzek Jul 23, 2025
1fe739d
Fix the namelist settings
ekluzek Jul 23, 2025
522e347
Fix #3345 by adding mpi_bcast of mapalgo
ekluzek Jul 23, 2025
7ce9b26
Make sure dust is set to Zender so that Clm60 compsets can be used, a…
ekluzek Jul 23, 2025
f381b15
Add new test for obscure mapping options and include a README in it's…
ekluzek Jul 23, 2025
f0e7a96
Change name of testmod to be more general so more options can be set
ekluzek Jul 23, 2025
13e1227
Update comments and add changes to the tintalgo options as well as tu…
ekluzek Jul 23, 2025
9c9e4ca
Update test for obscure stream options
ekluzek Jul 23, 2025
efb24c5
Turn on ignore-warnings so that the Prigent stream can be used even t…
ekluzek Jul 24, 2025
14bbc96
Add ch4finundatedmapalgo, and prigentroughnessmapalgo as they are in …
ekluzek Jul 24, 2025
f39be8c
Merge pull request #2534 from briandobbins/fix_urbantvmapalgo_broadcast
ekluzek Jul 24, 2025
f603a8a
Merge pull request #3318 from billsacks/fix_self_tests
ekluzek Jul 24, 2025
4f23151
Merge branch 'b4b-dev' into isop_sm_factor
ekluzek Jul 24, 2025
5e112ed
Merge remote-tracking branch 'escomp/b4b-dev' into isop_sm_factor
ekluzek Jul 24, 2025
150ecc2
Fix spelling of Volatile for VOC's
ekluzek Jul 24, 2025
b6fd08f
Add some tests for the new megan_opts namelist
ekluzek Jul 24, 2025
b56cdb4
Fix the name for the mapalgo options
ekluzek Jul 24, 2025
e88b5d4
Move the new megan_opts tests to the fail section and not the warning…
ekluzek Jul 24, 2025
733de4f
Add handling for the new megan_opts namelist items
ekluzek Jul 24, 2025
657b7c1
Add default setting for megan_min_gamma_sm
ekluzek Jul 24, 2025
f783875
Merge pull request #3309 from fvitt/isop_sm_factor
ekluzek Jul 25, 2025
4037e5a
Merge tag 'ctsm5.3.064' into merge-b4bdev-20250725
ekluzek Jul 25, 2025
1eee43d
Update change files
ekluzek Jul 25, 2025
6e4983d
Update change files
ekluzek Jul 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-clm6-aliases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Checkout submodules
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-image-build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Uses the `docker/login-action` action to log in to the Container registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:

# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see [Using artifact attestations to establish provenance for builds](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/docker-image-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,11 @@ jobs:
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Ensure that the repository part of IMAGE_NAME is lowercase. This is needed because Docker requires image names to be entirely lowercase. Note that the *image name* part, set as IMAGE_BASENAME in the env block above, is *not* converted. This will cause the check-version job to fail if the IMAGE_BASENAME contains capitals. We don't want to silently fix that here; rather, we require the user to specify a lowercase IMAGE_BASENAME.
- name: Get image name with lowercase repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-image-get-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Get version number from Dockerfile and check it
id: get-check-version
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docs-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Get all history, ensuring all branches are available for checkout
fetch-depth: 0

- name: Setup Pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5

# Check out all submodules because we might :literalinclude: something from one
- name: Checkout all submodules
Expand All @@ -60,11 +60,11 @@ jobs:
./build_docs_to_publish -d --site-root https://escomp.github.io/CTSM

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3
with:
# Upload publish dir
path: 'doc/_publish'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@f33f41b675f0ab2dc5a6863c9a170fe83af3571e # v4
8 changes: 4 additions & 4 deletions .github/workflows/docs-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
lfs: true
Expand All @@ -35,12 +35,12 @@ jobs:
# Based on https://github.com/actions/cache/blob/main/examples.md#python---pip
- name: Install python
if: ${{ ! inputs.use_conda }}
uses: actions/setup-python@v2
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.13.2' # needs to be coordinated with version in python/conda_env_ctsm_py.txt
- name: Cache pip
if: ${{ ! inputs.use_conda }}
uses: actions/cache@v3
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('doc/ctsm-docs_container/requirements.txt') }}
Expand All @@ -54,7 +54,7 @@ jobs:
# Do this if using conda
- name: Set up conda environment
if: ${{ inputs.use_conda }}
uses: conda-incubator/setup-miniconda@v3
uses: conda-incubator/setup-miniconda@2defc80cc6f4028b1780c50faf08dd505d698976 # v3
with:
activate-environment: ${{ inputs.conda_env_name }}
environment-file: ${{ inputs.conda_env_file }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-omnibus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
lfs: true
Expand All @@ -36,7 +36,7 @@ jobs:

# Set up conda
- name: Set up conda environment
uses: conda-incubator/setup-miniconda@v3
uses: conda-incubator/setup-miniconda@2defc80cc6f4028b1780c50faf08dd505d698976 # v3
with:
activate-environment: ctsm_pylib
environment-file: python/conda_env_ctsm_py.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-update-ctsm_pylib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
needs: test-build-docs-ctsm_pylib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Create issue
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docs-update-dependency-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
lfs: true
Expand All @@ -38,7 +38,7 @@ jobs:
bin/git-fleximod update -o

- name: Set up conda environment
uses: conda-incubator/setup-miniconda@v3
uses: conda-incubator/setup-miniconda@2defc80cc6f4028b1780c50faf08dd505d698976 # v3
with:
activate-environment: ${{ inputs.conda_env_name }}
environment-file: ${{ inputs.conda_env_file }}
Expand All @@ -53,7 +53,7 @@ jobs:
makefile-method:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
lfs: true
Expand All @@ -64,7 +64,7 @@ jobs:
bin/git-fleximod update -o

- name: Set up conda environment
uses: conda-incubator/setup-miniconda@v3
uses: conda-incubator/setup-miniconda@2defc80cc6f4028b1780c50faf08dd505d698976 # v3
with:
activate-environment: ${{ inputs.conda_env_name }}
environment-file: ${{ inputs.conda_env_file }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-update-doc-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
lfs: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
steps:

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Check out all submodules because we might :literalinclude: something from one
- name: Checkout all submodules
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Set up the conda environment
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@2defc80cc6f4028b1780c50faf08dd505d698976 # v3
with:
activate-environment: ctsm_pylib
environment-file: python/conda_env_ctsm_py.yml
Expand All @@ -42,10 +42,10 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Set up the conda environment
- uses: conda-incubator/setup-miniconda@v3
- uses: conda-incubator/setup-miniconda@2defc80cc6f4028b1780c50faf08dd505d698976 # v3
with:
activate-environment: ctsm_pylib
environment-file: python/conda_env_ctsm_py.yml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/xml-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.x'

Expand Down
14 changes: 7 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CISM-wrapper
[submodule "rtm"]
path = components/rtm
url = https://github.com/ESCOMP/RTM
fxtag = rtm1_0_87
fxtag = rtm1_0_88
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESCOMP/RTM

[submodule "mosart"]
path = components/mosart
url = https://github.com/ESCOMP/MOSART
fxtag = mosart1.1.09
fxtag = mosart1.1.10
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESCOMP/MOSART
Expand All @@ -68,31 +68,31 @@ 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.43
fxtag = ccs_config_cesm1.0.48
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

[submodule "cime"]
path = cime
url = https://github.com/ESMCI/cime
fxtag = cime6.1.102
fxtag = cime6.1.107
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESMCI/cime

[submodule "cmeps"]
path = components/cmeps
url = https://github.com/ESCOMP/CMEPS.git
fxtag = cmeps1.0.48
fxtag = cmeps1.1.2
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

[submodule "cdeps"]
path = components/cdeps
url = https://github.com/ESCOMP/CDEPS.git
fxtag = cdeps1.0.75
fxtag = cdeps1.0.79
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
Expand All @@ -108,7 +108,7 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CESM_share
[submodule "parallelio"]
path = libraries/parallelio
url = https://github.com/NCAR/ParallelIO
fxtag = pio2_6_4
fxtag = pio2_6_6
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/NCAR/ParallelIO
Expand Down
33 changes: 29 additions & 4 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ sub setup_cmdl_bgc {
# Set soil matrix (which is needed later for spinup)
$var = "use_soil_matrixcn";
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, $var,
, 'use_fates'=>$nl_flags->{'use_fates'},
, 'use_fates'=>$nl_flags->{'use_fates'},
, 'soil_decomp_method'=>$nl_flags->{'soil_decomp_method'},
, 'phys'=>$nl_flags->{'phys'}, clm_accelerated_spinup=>$nl_flags->{'clm_accelerated_spinup'} );
if ( &value_is_true($nl->get_value($var)) ) {
Expand Down Expand Up @@ -1230,7 +1230,7 @@ sub setup_cmdl_spinup {
if ( &value_is_true($nl_flags->{'use_cn'}) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition,
$defaults, $nl, "spinup_state", clm_accelerated_spinup=>$nl_flags->{'clm_accelerated_spinup'},
use_cn=>$nl_flags->{'use_cn'}, use_fates=>$nl_flags->{'use_fates'},
use_cn=>$nl_flags->{'use_cn'}, use_fates=>$nl_flags->{'use_fates'},
use_soil_matrixcn=>$nl_flags->{"use_soil_matrixcn"} );
if ( $nl->get_value("spinup_state") ne 0 ) {
$nl_flags->{'bgc_spinup'} = "on";
Expand Down Expand Up @@ -1803,6 +1803,7 @@ sub process_namelist_inline_logic {
# NOTE: After setup_logic_dust_emis #
#####################################
setup_logic_megan($opts, $nl_flags, $definition, $defaults, $nl);
setup_logic_megan_opts($opts, $nl_flags, $definition, $defaults, $nl);

##################################
# namelist group: lai_streams #
Expand Down Expand Up @@ -4176,6 +4177,7 @@ sub setup_logic_dust_emis {

sub setup_logic_megan {
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;
# Setup megan_emis_nl namelist for drv_flds_in

my $var = "megan";

Expand Down Expand Up @@ -4205,6 +4207,29 @@ sub setup_logic_megan {

#-------------------------------------------------------------------------------

sub setup_logic_megan_opts {
my ($opts, $nl_flags, $definition, $defaults, $nl) = @_;
# Setup megan_opts namelist
# This should be set when megan is turned on by CTSM, but also when CAM has turned it on

if ($nl_flags->{'megan'} ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'megan_use_gamma_sm');
if ( &value_is_true( $nl->get_value('megan_use_gamma_sm') ) ) {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'megan_min_gamma_sm');
} elsif ( defined($nl->get_value('megan_min_gamma_sm')) ) {
$log->fatal_error("megan_min_gamma_sm should NOT be set when megan_use_gamma_sm NOT TRUE.\n" );
}
}
else {
if ( defined($nl->get_value('megan_use_gamma_sm')) ||
defined($nl->get_value('megan_min_gamma_sm')) ) {
$log->fatal_error("MEGAN options should NOT be set when MEGAN is NOT in use.\n" );
}
}
}

#-------------------------------------------------------------------------------

sub setup_logic_soilm_streams {
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;

Expand Down Expand Up @@ -5016,7 +5041,7 @@ sub setup_logic_exice {
# excess ice streams, must be set before initial conditions
#
my ($opts, $nl_flags, $definition, $defaults, $nl, $physv) = @_;
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_excess_ice', 'phys'=>$physv->as_string());
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_excess_ice', 'phys'=>$physv->as_string());
my $use_exice = $nl->get_value( 'use_excess_ice' );
# Put use_exice into nl_flags so can be referenced later
if ( value_is_true($use_exice) ) {
Expand Down Expand Up @@ -5230,7 +5255,7 @@ sub write_output_files {

@groups = qw(clm_inparm ndepdyn_nml popd_streams urbantv_streams light_streams
soil_moisture_streams lai_streams atm2lnd_inparm lnd2atm_inparm clm_canopyhydrology_inparm cnphenology
cropcal_streams
cropcal_streams megan_opts
clm_soilhydrology_inparm dynamic_subgrid cnvegcarbonstate
finidat_consistency_checks dynpft_consistency_checks
clm_initinterp_inparm century_soilbgcdecompcascade
Expand Down
4 changes: 4 additions & 0 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<megan clm_accelerated_spinup="sasu">0</megan>
<megan configuration="nwp" >0</megan>

<!-- Setting to TRUE replicates previous ctsm5.3.063 answers, setting to false turns the soil moisture effect off -->
<megan_use_gamma_sm>.true.</megan_use_gamma_sm>
<megan_min_gamma_sm>0.0d00</megan_min_gamma_sm>

<!-- Supplmental Nitrogen mode -->
<suplnitro use_cn=".true." >NONE</suplnitro>
<suplnitro use_fates=".true." >ALL</suplnitro>
Expand Down
Loading
Loading