Skip to content

Conversation

rfiorella
Copy link
Contributor

@rfiorella rfiorella commented Jun 2, 2025

The NGEE Arctic IM3 updates introduced bendresist and vegshape parameters to the VegStructUpdateMod.F90 subroutine where the fraction of exposed LAI based on a given snow depth is calculated.
The bendresist parameter was incorrectly applied to only the denominator (e.g., only to fb) when it should also have been applied to the numerator (e.g., to ol).

Low values of bendresist would cause the value subtracted from 1 in the fb equations to become very large,
and therefore the right side of the fb equation would evaluate to < 0 often due to artificially low values of bendresist(ivt(p))*(htop(p)-hbot(p)).

This PR resolves this issue by applying these parameters to the heights calculated in ol as well.
In addition, these modified parameters are restricted to shrubs only (e.g., woody(ivt(p)) == 2.0_r8).

A few other small issues are addressed:

  1. fb in existing code actually corresponds to the fraction exposed, not the fraction buried. Equations are updated to clarify this, as are the equations for elai/esai slightly lower in VegStructUpdateMod.F90
  2. Values for stocking had been moved from hard-coded in VegStructUpdateMod.F90 to something that can be provided on a PFT parameter file, but corresponding logic to scale them to the correct units had not been added to pftvarcon.F90 - these are now added.
  3. Values for the four IM3 parameters are now added to the PFT parameter table written to the lnd.log from NGEE Arctic IM4 updates.

h/t @ctrotterlanl for pointing out the issue with the snow burial equations.

[non-BFB] but only for the test introduced for the original iteration of the IM3 feature (elm-snowveg_arctic), which is expected since the feature tested here has been modified.

Fixes #7410

@thorntonpe thorntonpe self-requested a review June 2, 2025 19:50
@rljacob rljacob added Land ELM land model labels Jun 3, 2025
@rljacob
Copy link
Member

rljacob commented Jun 3, 2025

Hi @rfiorella. Thanks for this. Can you open an issue describing the bug at https://github.com/E3SM-Project/E3SM/issues? That is what we usually do.

@rfiorella
Copy link
Contributor Author

@rljacob, sure happy to - I'll link the issue number back to this PR when done.

@rfiorella
Copy link
Contributor Author

Extra commits from yesterday come from a bad rebase we made on our systems. I'll fix this morning so that only the original 3 commits remain in this PR and move/fix the rebase to another branch.

Issues addressed:
a. stocking density units passed through to
VegStructUpdateMod.F90 were still stems/ha, they
should be stems/m2 at this point. Fixed in pftvarcon.F90
b. a few remaining issues in the burial fraction
equations for shrubs have been corrected.
rfiorella added 2 commits July 2, 2025 15:13
Missing parenthesis in VegStructUpdateMod.F90 preventing model build from completing.
@rfiorella
Copy link
Contributor Author

@thorntonpe just a quick check-in on this one, let me know if you need me to make any changes. Thanks!

@thorntonpe
Copy link
Contributor

@rfiorella I've reviewed these changes, and everything looks good to me. Thanks for catching the bug. Approving.

Copy link
Contributor

@thorntonpe thorntonpe left a comment

Choose a reason for hiding this comment

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

The changes all look reasonable.

@thorntonpe
Copy link
Contributor

@peterdschwartz please prioritize integrating this PR.

@peterdschwartz
Copy link
Contributor

@rfiorella I tested your branch merged to next against the e3sm_land_developer suite, but the elm-snowveg_arctic didn't DIFF. The merge looks correct to me so did it diff when you tested it ?

ERS.ELM_USRDAT.I1850CNPRDCTCBC.pm-cpu_intel.elm-snowveg_arctic (Overall: PASS) details:
    PASS ERS.ELM_USRDAT.I1850CNPRDCTCBC.pm-cpu_intel.elm-snowveg_arctic CREATE_NEWCASE
    PASS ERS.ELM_USRDAT.I1850CNPRDCTCBC.pm-cpu_intel.elm-snowveg_arctic XML
    PASS ERS.ELM_USRDAT.I1850CNPRDCTCBC.pm-cpu_intel.elm-snowveg_arctic SETUP
    PASS ERS.ELM_USRDAT.I1850CNPRDCTCBC.pm-cpu_intel.elm-snowveg_arctic SHAREDLIB_BUILD
    PASS ERS.ELM_USRDAT.I1850CNPRDCTCBC.pm-cpu_intel.elm-snowveg_arctic MODEL_BUILD
    PASS ERS.ELM_USRDAT.I1850CNPRDCTCBC.pm-cpu_intel.elm-snowveg_arctic SUBMIT
    PASS ERS.ELM_USRDAT.I1850CNPRDCTCBC.pm-cpu_intel.elm-snowveg_arctic RUN time=32
    PASS ERS.ELM_USRDAT.I1850CNPRDCTCBC.pm-cpu_intel.elm-snowveg_arctic COMPARE_base_rest
    PASS ERS.ELM_USRDAT.I1850CNPRDCTCBC.pm-cpu_intel.elm-snowveg_arctic MEMLEAK
    PASS ERS.ELM_USRDAT.I1850CNPRDCTCBC.pm-cpu_intel.elm-snowveg_arctic SHORT_TERM_ARCHIVER

@rfiorella
Copy link
Contributor Author

@peterdschwartz It did not, and I think it's just because the test isn't long enough for the incorrect behavior to show up. A longer test should show the difference.

Let me know if you'd like me to run a longer test (or change the existing test such that it runs longer).

@peterdschwartz
Copy link
Contributor

Right, the default test length isn't long enough to generate elm.h0 files. So i'd recommend changing the test name by adding a Lm1 tag:

ERS_Lm1.ELM_USRDAT.I1850CNPRDCTCBC.elm-snowveg_arctic

The current run takes ~30s on pm-cpu so doubling the simulation time shouldn't be a big issue.

@rfiorella
Copy link
Contributor Author

rfiorella commented Sep 18, 2025

@peterdschwartz I added a Lm6 flag, as I'm not sure if the issue would show up until polar night ends (so Jan. might still not be enough).

working on testing on local systems but we just had an OS migration, so a lot of packages aren't working yet, but I'll send an update when I've had a successful local test to show the diff.

@rfiorella
Copy link
Contributor Author

@peterdschwartz okay this should show the expected diff now, completed local tests.

Had to use an Ld* tag instead of an Lm* tag as I learned that cime/CIME/SystemTests/system_tests_common.py doesn't have logic for setting STOP_OPTION = nmonths. (L. 190-202).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ELM: Fraction of LAI/SAI buried by snow incorrect when bendresist pft parameter set
4 participants