Skip to content

Adding some more land-use-change and globally-relevant history variables#1485

Merged
glemieux merged 13 commits into
NGEET:mainfrom
ckoven:more_histvars_trendyruns
Feb 17, 2026
Merged

Adding some more land-use-change and globally-relevant history variables#1485
glemieux merged 13 commits into
NGEET:mainfrom
ckoven:more_histvars_trendyruns

Conversation

@ckoven
Copy link
Copy Markdown
Contributor

@ckoven ckoven commented Oct 10, 2025

This PR adds a few variables that I wanted to use for the TRENDY runs and/or global calibration.

Description:

These new variables include:

  • FATES_MEAN_95PCTILE_HEIGHT: calculates a gridcell-level height that is the average across all patcehs of the 95th percentile height. In discussions with @mpaiao, @JessicaNeedham and others, we decided this might be the closest approximation to a spaceborne or airborne lidar-derived metric
  • FATES_FIRE_CLOSS_LIVEFUELS: fire carbonloss from live fuels only
  • FATES_FIRE_CLOSS_LANDUSECHANGE: fire carbon loss associated with land use change ony (to allow separation of anthropogenic fire and wildfire fluxes, and thus allow calculation of a land-use-change carbon flux)
  • FATES_SECONDARY_AGB_ANTHROAGE_AP: The secondary aboveground biomass, resolved by age since anthropogenic disturbance. This is to allow comparison against observed secondary biomass regrowth curves.

In the interest of cleanup, this PR also gets rid of a few history variables:

  • FATES_PRIMARY_AREA: we don't need this anymore because we have FATES_PATCHAREA_LU which is the area of each land use type (and thus contains this info)
  • FATES_SECONDARY_AREA: ditto above
  • FATES_SECONDARY_AREA_ANTHRO: this variable as written didn't make sense, the correct variable with this info is FATES_SECONDARY_AREA_ANTHRO_AP

Collaborators:

@mpaiao, @JessicaNeedham

Expectation of Answer Changes:

should not be answer-changing except for the different variables (though perhaps roundoff level changes to fire and downstream fluxes like NBP because order of operations changed?)

Checklist

If this is your first time contributing, please read the CONTRIBUTING document.

All checklist items must be checked to enable merging this pull request:

Contributor

  • The in-code documentation has been updated with descriptive comments
  • The documentation has been assessed to determine if updates are necessary

Integrator

  • FATES PASS/FAIL regression tests were run
  • Evaluation of test results for answer changes was performed and results provided
  • FATES-CLM6 Code Freeze: satellite phenology regression tests are b4b

If satellite phenology regressions are not b4b, please hold merge and notify the FATES development team.

Documentation

Test Results:

Not yet tested here. I cherry-picked all of these from my working branch, so it is possible there are conflicts that I didn't catch.

CTSM (or) E3SM (specify which) test hash-tag:

CTSM (or) E3SM (specify which) baseline hash-tag:

FATES baseline hash-tag:

Test Output:

@glemieux
Copy link
Copy Markdown
Contributor

@rgknox to review wrt potential conflicts with the mass balance PR #1473

Comment thread biogeochem/EDPatchDynamicsMod.F90 Outdated
@glemieux
Copy link
Copy Markdown
Contributor

glemieux commented Feb 8, 2026

After applying the suggested fixes above, I'm getting B4B results against the current baseline, but I'm seeing the FatesColdNoComp tests and one long term Fates test fail due to mass balance error:

Here's the top part of the error output:

1558 dec2388.hsn.de.hpc.ucar.edu 626:  mass balance error detected
1559 dec2388.hsn.de.hpc.ucar.edu 626:  element type (see PRTGenericMod.F90):            1
1560 dec2388.hsn.de.hpc.ucar.edu 626:  error fraction relative to biomass stock:   1.073476295371222E-005
1561 dec2388.hsn.de.hpc.ucar.edu 626:  absolut error (flux in - change):   4.386468499720486E-002
1562 dec2388.hsn.de.hpc.ucar.edu 626:  call index:            3
1563 dec2388.hsn.de.hpc.ucar.edu 626:  Element index (PARTEH global):           1
1564 dec2388.hsn.de.hpc.ucar.edu 626:  net:   0.658009362837818     
1565 dec2388.hsn.de.hpc.ucar.edu 626:  dstock:   0.614144677840613     
1566 dec2388.hsn.de.hpc.ucar.edu 626:  seed_in:   0.000000000000000E+000
1567 dec2388.hsn.de.hpc.ucar.edu 626:  net_root_uptake:   0.000000000000000E+000
1568 dec2388.hsn.de.hpc.ucar.edu 626:  gpp_acc:    10.2238555345952     
1569 dec2388.hsn.de.hpc.ucar.edu 626:  flux_generic_in:   0.000000000000000E+000
1570 dec2388.hsn.de.hpc.ucar.edu 626:  wood_product_harvest:   0.000000000000000E+000  0.000000000000000E+000
1571 dec2388.hsn.de.hpc.ucar.edu 626:   0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
1572 dec2388.hsn.de.hpc.ucar.edu 626:   0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
1573 dec2388.hsn.de.hpc.ucar.edu 626:   0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
1574 dec2388.hsn.de.hpc.ucar.edu 626:   0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
1575 dec2388.hsn.de.hpc.ucar.edu 626:   0.000000000000000E+000  0.000000000000000E+000 
1576 dec2388.hsn.de.hpc.ucar.edu 626:  wood_product_landusechange:   0.000000000000000E+000  0.000000000000000E+000
1577 dec2388.hsn.de.hpc.ucar.edu 626:   0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
1578 dec2388.hsn.de.hpc.ucar.edu 626:   0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
1579 dec2388.hsn.de.hpc.ucar.edu 626:   0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
1580 dec2388.hsn.de.hpc.ucar.edu 626:   0.000000000000000E+000  0.000000000000000E+000  0.000000000000000E+000
1581 dec2388.hsn.de.hpc.ucar.edu 626:   0.000000000000000E+000  0.000000000000000E+000 
1582 dec2388.hsn.de.hpc.ucar.edu 626:  error from patch resizing:   0.000000000000000E+000
1583 dec2388.hsn.de.hpc.ucar.edu 626:  burn_flux_to_atm:   0.000000000000000E+000   1.99651592579519
1584 dec2388.hsn.de.hpc.ucar.edu 626:   0.000000000000000E+000  0.000000000000000E+000 
1585 dec2388.hsn.de.hpc.ucar.edu 626:  seed_out:   0.000000000000000E+000
1586 dec2388.hsn.de.hpc.ucar.edu 626:  flux_generic_out:   0.000000000000000E+000
1587 dec2388.hsn.de.hpc.ucar.edu 626:  frag_out:   0.287509343456400
1588 dec2388.hsn.de.hpc.ucar.edu 626:  aresp_acc:    7.28182090250577
1589 dec2388.hsn.de.hpc.ucar.edu 626:  herbivory_flux_out:   0.000000000000000E+000
1590 dec2388.hsn.de.hpc.ucar.edu 626:  error=net_flux-dstock:  4.386468499720486E-002
1591 dec2388.hsn.de.hpc.ucar.edu 626:  biomass   3552.89499142278
1592 dec2388.hsn.de.hpc.ucar.edu 626:  litter   333.366217774536
1593 dec2388.hsn.de.hpc.ucar.edu 626:  seeds   199.966422129737
1594 dec2388.hsn.de.hpc.ucar.edu 626:  total stock   4086.22763132705
1595 dec2388.hsn.de.hpc.ucar.edu 626:  previous total   4085.61348664921

More of the output can be found in the case output here:

/glade/u/home/glemieux/scratch/ctsm-tests/tests_pr1485-fates/SMS_Lm6.f45_f45_mg37.I2000Clm50FatesCruRsGs.derecho_intel.clm-Fates.GC.pr1485-fates_int

@glemieux
Copy link
Copy Markdown
Contributor

glemieux commented Feb 9, 2026

After applying the suggested fixes above, I'm getting B4B results against the current baseline, but I'm seeing the FatesColdNoComp tests and one long term Fates test fail due to mass balance error:

I determined that I accidentally introduced an error when I applied 632a127. This is corrected via 2680f31.

@glemieux
Copy link
Copy Markdown
Contributor

glemieux commented Feb 9, 2026

Regression testing against fates-sci.1.90.0_api.43.1.0-ctsm5.4.011 is showing expected FIELDLIST differences due to the introduction of the three new history variables. All other tests are B4B save one. The AllVars test is failing exact restart due to the #700, although this is expected.

Results: /glade/u/home/glemieux/scratch/ctsm-tests/tests_pr1485-fates2

@glemieux glemieux moved this from Finding Reviewers to Ready to Integrate in FATES Pull Request Planning and Status Feb 12, 2026
@glemieux glemieux moved this from Ready to Integrate to Under Review in FATES Pull Request Planning and Status Feb 12, 2026
Comment on lines +3025 to +3028
if (((ccohort%c_area + crown_area_covered)/cpatch%area) .ge. 0.05_r8 ) then
hio_patch_weighted_95thpctile_height_si(io_si) = &
hio_patch_weighted_95thpctile_height_si(io_si) + ccohort%height * cpatch%area/AREA
ccohort => null() ! exit the cohort loop
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Linking @rgknox comment here: #1529 (comment) since I'm closing #1529

@glemieux glemieux merged commit b091de3 into NGEET:main Feb 17, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Under Review to Ready to Integrate in FATES Pull Request Planning and Status Feb 17, 2026
peterdschwartz added a commit to E3SM-Project/E3SM that referenced this pull request Mar 24, 2026
This pull request passes HLM biophysical landuse variables into fates to by output as diagnostic variables along FATES dimensions.
Thefates_cold_luh2 test mod is updated to include these new diagnostic variables.
This also updates the fates_cold_allvars testmod to include new history variables added with NGEET/fates#1485.

This PR is the ELM-side code changes associated with FATES PR NGEET/fates#1536.

[B4B]
peterdschwartz added a commit to E3SM-Project/E3SM that referenced this pull request Mar 25, 2026
This pull request passes HLM biophysical landuse variables into fates to by output as diagnostic variables along FATES dimensions.
 Thefates_cold_luh2 test mod is updated to include these new diagnostic variables.
This also updates the fates_cold_allvars testmod to include new history variables added with NGEET/fates#1485.

This PR is the ELM-side code changes associated with FATES PR NGEET/fates#1536.

[non-BFB] for FATES due to field lists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

output: diagnostics software: history output Pertaining to FATES history output variables

Projects

Development

Successfully merging this pull request may close these issues.

2 participants