Repository navigation
Clear the SMS-3DTKE nonlocal momentum flux where the column is not convective - #2443
Merged
weiwangncar merged 1 commit intoNov 14, 2026
Merged
Conversation
…nvective nonlocal_flux sets gamu and gamv only in convective columns and leaves them alone elsewhere. They are kept between steps and vertical_diffusion_implicit applies them every step, so a column that stops being convective went on with the last convective value. Set them to zero in the non-convective branch.
Collaborator
|
The regression test results: |
Collaborator
|
@zhangxsms Can you take a look at this PR? Thanks! |
weiwangncar
approved these changes
Nov 14, 2026
weiwangncar
left a comment
Collaborator
There was a problem hiding this comment.
Agreed by the original code contributor, Xu Zhang.
dudhia
approved these changes
Nov 14, 2026
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.
TYPE: bug fix
KEYWORDS: SMS-3DTKE, km_opt = 5, nonlocal flux, gamu, gamv
SOURCE: Mark I. Richardson (Aeolis Research)
DESCRIPTION OF CHANGES:
Problem:
In nonlocal_flux (dyn_em/module_diffusion_em.F), gamu and gamv are set only in convective columns. They are state arrays kept from step to step and applied every step in vertical_diffusion_implicit, so a column that stops being convective keeps its last nonlocal momentum flux for as long as it stays stable. Details in #2442.
Solution:
Set gamu and gamv to zero in the ELSE branch, next to pblflg = .false., as nlflux is already zeroed in every column. Convective columns are unchanged.
ISSUE:
Fixes #2442
LIST OF MODIFIED FILES:
M dyn_em/module_diffusion_em.F
TESTS CONDUCTED:
RELEASE NOTE: SMS-3DTKE (km_opt = 5): the nonlocal momentum flux is now cleared in columns that are not convective, instead of keeping its last convective value.