Skip to content

Completing the FATES-CLM nitrogen coupling #3378

Description

@slevis-lmwg

I think of this as the parent issue: NGEET/fates#1270

Currently we can only send synthetic uptake boundary conditions to FATES, and send nothing back to CLM.

This issue will address coupling to CLM's:

  • Uptake competition code
  • Nitrogen fixation code

In meeting with @rgknox and @adrifoster we discussed that I should focus on the
else !----------NITRIF_DENITRIF-------------!
section of SoilBiogeochemCompetitionMod.F90 (<-- for guidance see Allocation in E3SM-Project/E3SM#4325)
and on new bc_in lines in utils/clmfates_interfaceMod.F90.
@rgknox suggested that for now FATES need not worry about .not. use_nitrif_denitrif.

Testing starting from ctsm5.3.065 (fates: sci.1.84.0_api.40.0.0):
A motivation behind this update is to perform single-point FATES-MIMICS simulations, so I modified this existing test as below
ERS_D_Ld30.f45_f45_mg37.I2000Clm50FatesCruRsGs.izumi_nag.clm-FatesColdPRT2
Side notes about PRT2 tests:

Single-point tests
PASS ERS_D_Ld30.1x1_brazil.I2000Clm60FatesCrujraRs.derecho_intel.clm-FatesColdPRT2
Turning on mimics shows that we will need to troubleshoot the FATES-MIMICS coupling:
FAIL ERS_D_Ld30.1x1_brazil.I2000Clm60FatesCrujraRs.derecho_intel.clm-FatesColdPRT2--clm-mimicsFatesCold
Fates and fireemis cannot both be true, so...
FAIL ERS_D_Ld30.1x1_brazil.I2000Clm60FatesCrujraRs.derecho_intel.clm-FatesColdPRT2--clm-mimicsFatesCold--clm-nofireemis DUMPS CORE and states "floating overflow" in line 1180 SoilBiogeochemDecompCascadeMIMICSMod.F90

So I tried our preexisting FATES-MIMICS test with nofireemis appended
FAIL ERP_P256x2_Ld30.f45_f45_mg37.I2000Clm60FatesRs.derecho_intel.clm-mimicsFatesCold--clm-nofireemis
CH4 Conservation Error in CH4Mod during diffusion, nstep, c, errch4 (mol /m^2.timestep) 1 2 NaN
Same test in debug mode
ERP_D_P256x2_Ld30.f45_f45_mg37.I2000Clm60FatesRs.derecho_intel.clm-mimicsFatesCold--clm-nofireemis
traceback

floating overflow
...
floating invalid
...
process killed (SIGTERM)
197  BandDiagonalMod.F90
415  SoilTemperatureMod.F90
883  clm_driver.F90

@rgknox suggests switching from intel to gnu for better uninitialized variable catching.

Activity

  1. self-assigned this
    on Jul 30, 2025
  2. added
    enhancementnew capability or improved behavior of existing capability
    FATES API updateChanges to the FATES version that also REQUIRE an API change in CTSM
    scienceEnhancement to or bug impacting science
    non-b4bChanges answers (incl. adding tests)
    test: aux_clmPass aux_clm suite before merging
    test: ctsm_sciRun and check ctsm_sci suite before merging
    test: fatesPass fates test suite before merging
    on Jul 30, 2025
  3. moved this from Todo to In Progress in LMWG: Sprint Planning Boardon Jul 30, 2025
  4. slevis-lmwg commented on Jul 30, 2025

    @slevis-lmwg
    ContributorAuthor

    From meeting with @rgknox

    • First thing to try... Uncomment sections of subroutine UpdateNLitterFluxes in utils/clmfates_interfaceMod.F90, remove the hardwiring to 0, and PASS ERS_D_Ld30.1x1_brazil.I2000Clm60FatesCrujraRs.derecho_intel.clm-FatesColdPRT2.
    • Try non-PRT2 test in case it fails: PASS ERS_D_Ld30.1x1_brazil.I2000Clm60FatesCrujraRs.derecho_intel.clm-FatesCold
    • In ELM's AllocationMod focus on RD (rel. demand) modifications, note that many of the mods are due to refactoring, and corresponding mods in CLM should go in SoilBiogeochemCompetitionMod: see 2025/8/8 post.
    • ch4Mod appears already done.
    • Need to address harvest (ask Charlie if need help): commented out hrv_deadstem_to_prod* lines in clmfates_interfaceMod for fates_parteh_mode == 2.
    • When ready to turn on MIMICS, address EXPECTED FAILURE: ERP_P256x2_Ld30.f45_f45_mg37.I2000Clm60FatesRs.derecho_intel.clm-mimicsFatesCold #2261 and may need "if mimics" section near line 158 in src/biogeochem/CNNStateUpdate1Mod.F90 (lines 168-177 may need to be copied to the interface code above).
    • This point repeats below: Think about how CLM can tell FATES to not run the phosphorus code. Ryan wrote:

    It would take a complete re-write of the FATES side code to not cycle and allocate P along with N. So I think going forward, we just use synthetic boundary conditions for P and just make sure that it is not limiting

  5. 7 remaining items

  6. rosiealice commented on Aug 26, 2025

    @rosiealice
    Contributor

    Thanks @slevis-lmwg :)

  7. moved this from In Progress to Stalled in LMWG: Sprint Planning Boardon Nov 25, 2025
  8. moved this from Stalled to In Progress in LMWG: Sprint Planning Boardon Dec 5, 2025
  9. slevis-lmwg commented on Dec 11, 2025

    @slevis-lmwg
    ContributorAuthor
  10. added this to the ctsm6.1.0 milestone on Jan 21, 2026
  11. ekluzek commented on Jan 21, 2026

    @ekluzek
    Contributor

    I'm pretty sure the milestone for this is ctsm6.1 -- but please correct if I'm wrong.

  12. moved this from In Progress to Stalled in LMWG: Sprint Planning Boardon Feb 3, 2026
  13. moved this from Stalled to In Progress in LMWG: Sprint Planning Boardon Feb 3, 2026
  14. slevis-lmwg commented on Apr 14, 2026

    @slevis-lmwg
    ContributorAuthor

    For my Sprint accounting I will mark the issue "done" and continue tracking in the PR.

  15. moved this from In Progress to Done in LMWG: Sprint Planning Boardon Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

FATES API updateChanges to the FATES version that also REQUIRE an API change in CTSMenhancementnew capability or improved behavior of existing capabilitynon-b4bChanges answers (incl. adding tests)scienceEnhancement to or bug impacting sciencetest: aux_clmPass aux_clm suite before mergingtest: ctsm_sciRun and check ctsm_sci suite before mergingtest: fatesPass fates test suite before merging

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions