Skip to content

Address bug in specification of organic matter fraction - #8629

Open
rfiorella wants to merge 4 commits into
masterfrom
ngee-arctic/elm/soil_om_fix
Open

Address bug in specification of organic matter fraction#8629
rfiorella wants to merge 4 commits into
masterfrom
ngee-arctic/elm/soil_om_fix

Conversation

@rfiorella

@rfiorella rfiorella commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

There appears to be a bug in SoilHydrologyType.F90 and SoilStateType.F90 during initialization that squares the organic matter fraction when more_vertlayers .eq. false but not when more_vertlayers .eq. true that came over when E3SM was initialized. This appears to be applied only to places where om_frac modifies thermal_conductivity, meaning that om_frac can be different in different places in the code. (h/t @gretamiller for finding this issue and working on the solution)

The more_vertlayers .eq. true branch 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. false and 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.

Greta Amy Miller and others added 4 commits August 13, 2026 10:59
…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.
@rfiorella rfiorella added bug fix PR ELM land model fromES PR from an E3SM ecosystem project or other external effort labels Aug 13, 2026
@rljacob
rljacob requested a review from bishtgautam August 13, 2026 20:55
@rfiorella rfiorella changed the title Address bug in specification of organic matter density Address bug in specification of organic matter fraction Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix PR ELM land model fromES PR from an E3SM ecosystem project or other external effort

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants