Skip to content

Apply the SMS-3DTKE partition function once to the entrainment part of the nonlocal heat flux - #2445

Merged
weiwangncar merged 1 commit into
wrf-model:release-v4.8.1from
mirfjc:sms3dtke_entrainment_pnl_once
Nov 14, 2026
Merged

weiwangncar merged 1 commit into
wrf-model:release-v4.8.1from
mirfjc:sms3dtke_entrainment_pnl_once

Conversation

@mirfjc

@mirfjc mirfjc commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

TYPE: bug fix

KEYWORDS: SMS-3DTKE, km_opt = 5, nonlocal flux, entrainment, grey zone

SOURCE: Mark I. Richardson (Aeolis Research)

DESCRIPTION OF CHANGES:
Problem:
In nonlocal_flux (dyn_em/module_diffusion_em.F), the entrainment flux hfxpbl is multiplied by the partition function P_NL when it is formed, and the whole nonlocal profile, entrainment part included, is multiplied by P_NL again. So the entrainment part carries P_NL**2. Zhang et al. (2018, MWR 146, eq. 35) and the Shin-Hong scheme apply P_NL once. Details in #2444.

Solution:
Remove the first multiplication (hfxpbl = hfxpbl*pth1). The profile is still scaled once by P_NL. Results change only in the grey zone, where 0 < P_NL < 1.

ISSUE:
Fixes #2444

LIST OF MODIFIED FILES:
M dyn_em/module_diffusion_em.F

TESTS CONDUCTED:

  1. Yes. Real data case, Hurricane Matthew, FNL 2016-10-06_00. d01 only, 100x70 at 30 km, 48 levels, time_step = 180, CONUS suite with bl_pbl_physics = 0, sf_sfclay_physics = 1, diff_opt = 2, km_opt = 5, 6 hours: wrfout byte-identical before and after the fix, as expected (P_NL = 1 at this grid spacing). Grey zone: em_les with dx = dy = 500, time_step = 3, km_opt = 5, 1 hour (950 m mixed layer, P_NL about 0.66). After the fix the mean theta at 900-1100 m is 0.0047 K lower and at 100-800 m 0.0010 K higher after 1 h, largest gridpoint change 0.05 K: more entrainment heat flux, as intended. Built on release-v4.8.1 (28239d1) with configure option 35, Homebrew gfortran/gcc 16.2.0 at -O2, macOS on Apple Silicon, run on 1 MPI rank.
  2. The regression (Jenkins) tests have passed.

RELEASE NOTE: SMS-3DTKE (km_opt = 5): in the grey zone the entrainment part of the nonlocal heat flux is now scaled by the partition function once, not twice, so it is stronger by a factor 1/P_NL.

…f the nonlocal heat flux

In nonlocal_flux the entrainment flux at the PBL top was multiplied by the partition function P_NL when it was formed, and the whole nonlocal profile was multiplied by P_NL again, so the entrainment part carried P_NL squared. Zhang et al. (2018, eq. 35) and the Shin-Hong scheme apply it once to the total. Results change only in the grey zone, where 0 < P_NL < 1.

	modified:   dyn_em/module_diffusion_em.F
@weiwangncar

Copy link
Copy Markdown
Collaborator

@zhangxsms Can you take a look at this PR too?

@weiwangncar weiwangncar added Retest and removed Retest labels Nov 5, 2026
@weiwangncar

Copy link
Copy Markdown
Collaborator

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

@weiwangncar weiwangncar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Agreed by Xu Zhang, the original code contributor.

@weiwangncar
weiwangncar merged commit 10b0659 into wrf-model:release-v4.8.1 Nov 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants