Skip to content

ctsm5.4.030: Add a FATES namelist option for land use transition logic#3728

Merged
samsrabin merged 21 commits intoESCOMP:masterfrom
JessicaNeedham:jfn-fates-nl-lulogic
Apr 7, 2026
Merged

ctsm5.4.030: Add a FATES namelist option for land use transition logic#3728
samsrabin merged 21 commits intoESCOMP:masterfrom
JessicaNeedham:jfn-fates-nl-lulogic

Conversation

@JessicaNeedham
Copy link
Copy Markdown
Contributor

Description of changes

This change is coordinated with FATES PR NGEET/fates#1489.
Together they move a hard coded value in FATES, which controls vegetation mortality during transition between land use classes, to a namelist option.

Specific notes

Contributors other than yourself, if any:

CTSM Issues Fixed (include github issue #):

Are answers expected to change (and if so in what way)?
This PR sets the default to option 1 which is different than the current hard coded value of 4. Setting the value to 4 would be equivalent to existing code.

Any User Interface Changes (namelist or namelist defaults changes)?
Yes - see above.

Does this create a need to change or add documentation? Did you do so?
On the FATES side. Not done yet.

Testing performed, if any:
Compiles and runs with NorESM-CTSM-FATES.

NOTE: Be sure to check your coding style against the standard
(https://github.com/ESCOMP/ctsm/wiki/CTSM-coding-guidelines) and review
the list of common problems to watch out for
(https://github.com/ESCOMP/CTSM/wiki/List-of-common-problems).

Copy link
Copy Markdown
Contributor

@glemieux glemieux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a check in the build namelist to make sure that landuse is not accidentally set off by the user in the namelist. I'll add this check. Otherwise this looks good.

Change to using the ifx compiler and some more fixes

Updates ccs_config to 1.0.75 which has the new ifx compiler in use for derecho_intel, as well as updating to using ESMF8.9.0. This exposed problems in the code on two fronts when running with DEBUG mode:

Reliance on short-circuiting in if statements
Problems with NaN's, in datasets especially _FillValue
For the former, we changed code to break up if statements so this would work. And with the latter we point to new datasets with the NaN's handled. mosart and cdeps code also had short-circuiting problems.

@samsrabin created a script to examine all of the files in namelist_defaults_ctsm.xml and in the testmod directories to check if there were problems with NaN's in _FillValues. The modified files here all were the result
of the first pass of that script. The new files all have a ".no_nan_fill.nc" ending on them.

Includes updating submodules: ccs_config, cdeps, mosart
Comment thread bld/namelist_files/namelist_defaults_ctsm.xml Outdated
@glemieux
Copy link
Copy Markdown
Contributor

glemieux commented Mar 9, 2026

FYI, issue to track adding the new namelist option to the FATES user's guide is here: NGEET/fates-users-guide#110

Copy link
Copy Markdown
Contributor

@ekluzek ekluzek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great thanks @JessicaNeedham. I have comments/questions on how best to document this for CTSM users so they have ways of looking up how this works.

There are some things that will need to happen before this comes in. This will come to master as it will include a FATES update, which normally has answer changes that come with it.

  • @glemieux makes a PR to this one with a change he sees needs to be done
  • Add in the FATES tag to the .gitmodule file
  • Resolve conversations
  • Decide who will do the testing and finalize the tag
  • Go through the normal testing/tagging process

Comment thread bld/namelist_files/namelist_definition_ctsm.xml
Comment thread bld/namelist_files/namelist_defaults_ctsm.xml Outdated
Comment thread src/main/clm_varctl.F90
Comment thread bld/namelist_files/namelist_defaults_ctsm.xml Outdated
@ekluzek ekluzek added enhancement new capability or improved behavior of existing capability science Enhancement to or bug impacting science usability Improve or clarify user-facing options non-bfb Changes answers (incl. adding tests) labels Mar 12, 2026
@github-project-automation github-project-automation Bot moved this to Ready to start (or start again) in CTSM: Upcoming tags Mar 12, 2026
@github-project-automation github-project-automation Bot moved this from Ready to start (or start again) to Stalled (needs review, blocked etc.) in CTSM: Upcoming tags Mar 12, 2026
@glemieux
Copy link
Copy Markdown
Contributor

glemieux commented Mar 18, 2026

@ekluzek, my PR to @JessicaNeedham branch has been merged. Would you give it another review when you get a chance and see if my changes look good to you? I think this may be ready for testing (which I'm willing to run).

Transfer biophysical variables for output with FATES dimensions

This pull request updates the high frequency wrapper procedure in the interface to pass
biophysical CLM variables to be output along FATES dimensions. The FATES land use x
pft dimension is also added to the history module.  The FATES base land use test module
adds the FATES history noted above to the test output.
@adrifoster adrifoster removed the next this should get some attention in the next week or two. Normally each Thursday SE meeting. label Mar 19, 2026
@samsrabin
Copy link
Copy Markdown
Member

Per SE meeting today: Don't go with @rgknox's suggestion of moving things to the namelist JSON.

@glemieux
Copy link
Copy Markdown
Contributor

FYI @ekluzek the fates-side testing is looking good so far: NGEET/fates#1489 (comment). Where in the queue do you think this is?

@ekluzek ekluzek changed the title Add a FATES namelist option for land use transition logic ctsm5.4.030: Add a FATES namelist option for land use transition logic Mar 26, 2026
Copy link
Copy Markdown
Contributor

@ekluzek ekluzek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have only one change that I think is important. Which is to remove the checking for valid values in CLMBuildNamelist.pm, since it's already done based on the valid_values in the namelist_definition_ctsm.xml file.

I suggest a change to the description in namelist_definition_ctsm.xml. And I was wondering about how the Fortran code reacts to bad values of the namelist flag.

So all things that are small.

@rgknox and @glemieux I'm not sure who's going to bring this in. But, if there are any questions on what I ask about we could meet to go over it.

Comment thread src/main/clm_varctl.F90
Comment thread src/main/clm_varctl.F90
Comment thread bld/namelist_files/namelist_definition_ctsm.xml
@github-project-automation github-project-automation Bot moved this from Final Testing to Under Review in FATES Pull Request Planning and Status Mar 31, 2026
@github-project-automation github-project-automation Bot moved this from In progress - master to Stalled (needs review, blocked etc.) in CTSM: Upcoming tags Mar 31, 2026
@ekluzek ekluzek moved this from Stalled (needs review, blocked etc.) to In progress - master in CTSM: Upcoming tags Mar 31, 2026
@ekluzek ekluzek self-requested a review April 1, 2026 18:08
Comment thread bld/CLMBuildNamelist.pm Outdated
Copy link
Copy Markdown
Contributor

@ekluzek ekluzek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving so this can go ahead. I resolved the previous conversations, and just added one to remove the extra testing of values in CLMBuildNML.pm.

Merge b4b-dev to master

- Various documentation updates
- Update submodules to ones in cesm3_0_alpha08l
- Bugfix for FatesSp compiled with intel

PR ESCOMP#3894
@glemieux glemieux moved this from Under Review to Final Testing in FATES Pull Request Planning and Status Apr 2, 2026
@glemieux
Copy link
Copy Markdown
Contributor

glemieux commented Apr 3, 2026

Final fates suite regression testing on izumi and derecho are underway.

@glemieux
Copy link
Copy Markdown
Contributor

glemieux commented Apr 3, 2026

Regression testing on derecho and izumi is underway. CC @samsrabin

@glemieux
Copy link
Copy Markdown
Contributor

glemieux commented Apr 4, 2026

Regression testing on derecho and izumi against ctsm5.4.029 is complete. All expected tests are B4B, with known diffs on FATES testmods (due to sci.1.91.3_api.43.1.0). FATES sp mode tests are B4B.

Results:
/glade/u/home/glemieux/scratch/ctsm-tests/tests_0403-151012de
/scratch/cluster/glemieux/ctsm-tests/tests_0403-151127iz

@glemieux glemieux moved this from Final Testing to Ready to Integrate in FATES Pull Request Planning and Status Apr 4, 2026
@glemieux
Copy link
Copy Markdown
Contributor

glemieux commented Apr 4, 2026

Changelog update. This is ready to integrate @samsrabin.

@glemieux
Copy link
Copy Markdown
Contributor

glemieux commented Apr 7, 2026

Removed the namelist build check per Erik's request. Retested build-namelist_test.pl and using ./run_sys_tests ... --extra-create-test-args " --no-run". All tests build successfully.

Results: /glade/u/home/glemieux/scratch/ctsm-tests/tests_0406-160019de

@samsrabin samsrabin merged commit 884f81a into ESCOMP:master Apr 7, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from In progress - master to Done (non release/external) in CTSM: Upcoming tags Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement new capability or improved behavior of existing capability non-bfb Changes answers (incl. adding tests) science Enhancement to or bug impacting science usability Improve or clarify user-facing options

Projects

Status: Done (non release/external)

Development

Successfully merging this pull request may close these issues.

5 participants