Skip to content

Conversation

@slevis-lmwg
Copy link
Contributor

@slevis-lmwg slevis-lmwg commented Aug 11, 2025

Description of changes

For now see the issue #3378

Corresponding mods on the FATES side:
NGEET/fates#1472

Nutrient enabled FATES handbook
FATES CLM N coupling

Specific notes

Contributors other than yourself, if any:
@rgknox @adrifoster @wwieder

CTSM Issues Fixed (include github issue #):
#3378

Are answers expected to change (and if so in what way)?

Any User Interface Changes (namelist or namelist defaults changes)?

Does this create a need to change or add documentation? Did you do so?

  • [ ] Todo: add a modification to the PRT2 test, make sure that prescribed P uptake is set to 10. This will ensure that there are no P limitations in fates, when FATES becomes coupled to CLM's N cycle (in future PR). i:e: fates_cnp_prescribed_puptake=10

Testing performed
...with the first two commits in this PR:

PASS ERS_D_Ld30.1x1_brazil.I2000Clm60FatesCrujraRs.derecho_intel.clm-FatesColdPRT2
PASS ERS_D_Ld30.1x1_brazil.I2000Clm60FatesCrujraRs.derecho_intel.clm-FatesCold

Later comments point out that these two tests were inadequate at catching problems, and that I switched to two other tests.

PASS ERS_D_Ld30.1x1_brazil.I2000Clm60FatesCrujraRs.derecho_intel.clm-FatesColdPRT2
FAIL ERS_D_Ld30.1x1_brazil.I2000Clm60FatesCrujraRs.derecho_intel.clm-FatesColdPRT2--clm-mimicsFatesCold--clm-nofireemis
The latter needs "nofireemis" to work with Fates, but it then dumps core in line 1180 SoilBiogeochemDecompCascadeMIMICSMod.F90
...calculating these variables:
nf_soil%decomp_npools_sourcesink_col
nf_soil%fates_litter_flux
@slevis-lmwg slevis-lmwg self-assigned this Aug 11, 2025
@slevis-lmwg slevis-lmwg added enhancement new capability or improved behavior of existing capability investigation Needs to be verified and more investigation into what's going on. science Enhancement to or bug impacting science test: aux_clm Pass aux_clm suite before merging test: fates Pass fates test suite before merging labels Aug 11, 2025
@slevis-lmwg slevis-lmwg linked an issue Aug 11, 2025 that may be closed by this pull request
1 task
@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Aug 13, 2025

With the latest commit, I repeated the two earlier tests and added another to check whether answers have changed from the baseline:

PASS ERS_D_Ld30.1x1_brazil.I2000Clm60FatesCrujraRs.derecho_intel.clm-FatesColdPRT2
PASS ERS_D_Ld30.1x1_brazil.I2000Clm60FatesCrujraRs.derecho_intel.clm-FatesCold
FAIL ERP_Ld9.f45_f45_mg37.I2000Clm50FatesRs.derecho_intel.clm-FatesColdAllVars -c /glade/campaign/cgd/tss/ctsm_baselines/ctsm5.3.065

The latter fails in case2, after reading the restart file, with a N balance error.

UPDATE

  • See below for suggestions to resolve FAIL
  • Add new test ERP_Ld9.f45_f45_mg37.I2000Clm50FatesRs.derecho_intel.clm-FatesColdPRT2 (sanity check first that it meets requirements set forth in the fourth checkbox here, which I think means pointing to an alternate fates paramfile)
  • Later comment explains why I decided to revert to preexisting ERS tests and skip adding this ERP test.

@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Aug 26, 2025

Enabled fixation and ran the same tests:

PASS ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdPRT2 -c /glade/campaign/cgd/tss/ctsm_baselines/fates-sci.1.84.0_api.40.0.0-ctsm5.3.066
PASS ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdLUH2 -c /glade/campaign/cgd/tss/ctsm_baselines/fates-sci.1.84.0_api.40.0.0-ctsm5.3.066

PRT2 still b4b with the baseline.
LUH2 now DIFF from the baseline.

PASS The same tests with the code change for harvest (same results relative to the baseline).

@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Sep 20, 2025

Worked on the next checkbox in the issue (#3378), submitted the same tests, and after some troubleshooting:
PASS PRT2 and b4b with the baseline.
PASS LUH2 and DIFF from the baseline as before.

These variables originate in fates, so this renaming requires the same
renaming in fates; I will open the corresponding PR very soon
@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Sep 23, 2025

OK ./build-namelist_test.pl
OK ./run_sys_tests -s fates -c fates-sci.1.84.0_api.40.0.0-ctsm5.3.066/ --skip-generate
REDO ./run_sys_tests -s aux_clm -c ctsm5.3.066 --skip-generate

Notes:

  • Gnu and nvhpc tests needed a bug-fix that intel didn't catch (next commit).
  • Then the fates test-suite worked (I didn't repeat aux_clm for now)
  • Many tests DIFFer from the baseline.
  • The PRT2 test had the expected NLCOMP change, though no DIFFs from the baseline (even after rebuilding/rerunning):
  BASE: suplnitro = 'ALL'
  COMP: suplnitro = 'NONE'

@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Sep 23, 2025

Updated the fates paramfile (see next commit) and submitted these two again

./create_test ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdLUH2 -c /glade/campaign/cgd/tss/ctsm_baselines/fates-sci.1.84.0_api.40.0.0-ctsm5.3.066
./create_test ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdPRT2 -c /glade/campaign/cgd/tss/ctsm_baselines/fates-sci.1.84.0_api.40.0.0-ctsm5.3.066

The first (LUH2) same as before (DIFF from baseline) since nothing changed for it.
The second (ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdPRT2.C.20250923_141838_qjxqou) now:

  • DIFF from baseline and
  • FAIL COMPARE_base_rest suggesting variable(s) missing from restart, I suspect

@slevis-lmwg
Copy link
Contributor Author

The reason for the last commit is explained in #2653 (comment).

Update crop parameters and maturity requirements

slevis resolved conflicts:
src/fates <-- So far I have not changed .gitmodules to point to my branch
src/soilbiogeochem/SoilBiogeochemCompetitionMod.F90
FATES JSON parameter files

These changes accommodate a JSON format to the FATES parameter file.

Documentation has been updated in the FATES User's Guide:
https://fates-users-guide.readthedocs.io/en/latest/user/Parameter-File.html

fates was updated from sci.1.88.0_api.42.0.0 to sci.1.89.0_api.43.0.0

ESCOMP and NGEET PRs:
ESCOMP#3570
NGEET/fates#1493

slevis resolved conflicts:
cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/shell_commands
cime_config/testdefs/testmods_dirs/clm/FatesColdPRT2/user_nl_clm
src/fates
@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Dec 20, 2025

After the latest updates, I'm submitting these tests with ./create_test:

PASS ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdPRT2_synthN
BASELINE ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdLUH2
COMPARE_base_rest ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdPRT2
COMPARE_base_rest ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdPRT2_suplnAll

LUH2 diffs from fates-sci.1.89.0_api.43.0.0-ctsm5.4.005:
FATES_HET_RESP 7.5810E-16 NORMALIZED 2.1208E-07
FATES_NEP 7.5810E-16 NORMALIZED 2.8903E-07
Ryan suggests not worrying about this one, as this may originate in an LUH2 issue.


PRT2 diffs in the same 38 fields in base.cprnc.out as in cprnc.out.

  • Ryan thinks that the restart problem comes from the FATES side because the problem appears when nitrogen becomes interactive
  • For troubleshooting, it may help to run 2 time steps in single-point, possibly turning off pieces of code, e.g. any litter generation and exudation
  • @rgknox offered to start some of this troubleshooting

PRT2_suplnAll h0a restart diffs in
SNOWICE 5.9583E-04 NORMALIZED 1.0038E-05
SNOWLIQ 6.3099E-04 NORMALIZED 5.7300E-03
but more fields in h1a and cpl...


Add this non-fates test to the list of four tests above:
SMS.f10_f10_mg37.I2000Clm50BgcCrop.derecho_intel.clm-crop

@slevis-lmwg

This comment was marked as resolved.

@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Feb 7, 2026

./create_test ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdPRT2_synthN
./create_test ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdLUH2 -c /glade/campaign/cgd/tss/ctsm_baselines/fates-sci.1.89.0_api.43.0.0-ctsm5.4.005
./create_test ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdPRT2 -c /glade/campaign/cgd/tss/ctsm_baselines/fates-sci.1.89.0_api.43.0.0-ctsm5.4.005
./create_test ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-FatesColdPRT2_suplnAll
./create_test SMS.f10_f10_mg37.I2000Clm50BgcCrop.derecho_intel.clm-crop -c /glade/campaign/cgd/tss/ctsm_baselines/ctsm5.4.005

PASS synthN
BASELINE LUH2
COMPARE_base_rest PRT2
COMPARE_base_rest PRT2-suplnAll
PASS SMS

@slevis-lmwg
Copy link
Contributor Author

@rgknox to follow up...
If this PR and the fates-side PR seem ready to you, then I think we should look for the source of the restart failure. I know you offered to help with that, but let me know if you would like me to start looking into it.

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 investigation Needs to be verified and more investigation into what's going on. science Enhancement to or bug impacting science test: aux_clm Pass aux_clm suite before merging test: fates Pass fates test suite before merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Completing the FATES-CLM nitrogen coupling

2 participants