Address bug in specification of organic matter fraction - #8629
Open
rfiorella wants to merge 4 commits into
Open
Conversation
…ared formulation, following CLM5.0 and Lawrence and Slater (2008). Also ensure om_frac does not exceed 1.
Add squareomfrac namelist option with default value true to allow selection between squared and unsquared organic matter fraction calculations in soil physics. When true (default), uses (organic3d/organic_max)**2 for backward compatibility. When false, uses min(organic3d/organic_max, 1.0) following CLM5.0 and Lawrence and Slater (2008).
When squareomfrac is false, change om_frac calculation to use max(0.0_r8, min(organic3d/organic_max, 1.0_r8)) to ensure the value is bounded between 0 and 1, preventing potential negative values.
…ement Add squareomfrac to namelist_defaults.xml with default value .true., and add it to the elm_varctl use statement in controlMod.F90. Also add logging output for the squareomfrac value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There appears to be a bug in
SoilHydrologyType.F90andSoilStateType.F90during initialization that squares the organic matter fraction whenmore_vertlayers .eq. falsebut not whenmore_vertlayers .eq. truethat came over when E3SM was initialized. This appears to be applied only to places whereom_fracmodifies thermal_conductivity, meaning thatom_fraccan be different in different places in the code. (h/t @gretamiller for finding this issue and working on the solution)The
more_vertlayers .eq. truebranch is the correct one based on the Slater and Lawrence (2008) implementation of this feature, and the bug has been fixed in upstream CLM.However, by default,
more_vertlayers .eq. falseand so the default configuration will underestimate the organic matter fraction except at 0 and 1, and therefore likely be too conductive. @gretamiller reached out to David Lawrence and confirmed that this was essentially a tuning knob to compensate for other issues in the soil when it was implemented.This fix allows turning off this "squared" relationship with a namelist option, and as a result, the e3sm_land_developer suite is BFB on pm-cpu.