Conservative scalar diffusion#378
Open
Thomas Bendall (tommbendall) wants to merge 13 commits intoMetOffice:mainfrom
Open
Conservative scalar diffusion#378Thomas Bendall (tommbendall) wants to merge 13 commits intoMetOffice:mainfrom
Thomas Bendall (tommbendall) wants to merge 13 commits intoMetOffice:mainfrom
Conversation
Update stable for vn3.1
iboutle
reviewed
Mar 26, 2026
Contributor
|
This will need a linked JEDI PR. I'll link it once ready. |
iboutle
reviewed
Mar 26, 2026
science/gungho/source/algorithm/diffusion/smagorinsky_alg_mod.x90
Outdated
Show resolved
Hide resolved
iboutle
reviewed
Mar 26, 2026
science/gungho/source/algorithm/diffusion/smagorinsky_alg_mod.x90
Outdated
Show resolved
Hide resolved
iboutle
reviewed
Mar 26, 2026
science/gungho/source/algorithm/diffusion/smagorinsky_alg_mod.x90
Outdated
Show resolved
Hide resolved
iboutle
reviewed
Mar 26, 2026
science/gungho/source/algorithm/diffusion/smagorinsky_alg_mod.x90
Outdated
Show resolved
Hide resolved
iboutle
reviewed
Mar 26, 2026
iboutle
reviewed
Mar 26, 2026
iboutle
reviewed
Mar 26, 2026
| =namelist:mixing=smag_l_calc: .true. ; | ||
| =namelist:mixing=max_diff_factor: .true.; | ||
| =namelist:mixing=conservative_diffusion: .true.; | ||
| =namelist:mixing=density_weighted: .true.; |
Contributor
There was a problem hiding this comment.
Suggest triggering this from conservative_diffusion, since it only applies if that is true
DanStoneMO
approved these changes
Mar 26, 2026
Contributor
DanStoneMO
left a comment
There was a problem hiding this comment.
With the recent commits, JEDI now runs fine with this as-is. No linked PR is needed anymore
Contributor
Author
Yes -- apologies for the confusion! This is because the new options are now only triggered by using Smagorinsky mixing, which isn't used in global or DA configurations |
James Bruten (james-bruten-mo)
approved these changes
Mar 27, 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.
PR Summary
Sci/Tech Reviewer: Shusuke Nishimoto (@mo-snishimoto)
Code Reviewer: mo-marqh
Implements the conservative form of the Smagorinsky diffusion operator for scalars, and ensures that the diffusion coefficient is appropriately capped.
See Also
The test branch, showing the action of the upgrade macro and the changed KGOs, can be found here: tommbendall#10
Details
This PR:
r_defprecision used insmagorinsky_alg_modDocumentation
Some documentation describing the approach can be found here: Conservative_Diffusion.pdf
Results
A selection of plots from tests with changed KGOs can be found in this PDF:
results_conservative_diffusion.pdf
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - test_conservative_diffusion/run2
Suite Information
Task Information
✅ succeeded tasks - 1511
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review