PC2 response to horizontal mixing#464
Open
iboutle wants to merge 6 commits intoMetOffice:mainfrom
Open
Conversation
James Bruten (james-bruten-mo)
approved these changes
Apr 30, 2026
Collaborator
James Bruten (james-bruten-mo)
left a comment
There was a problem hiding this comment.
Macro all fine
DanStoneMO
approved these changes
Apr 30, 2026
Contributor
DanStoneMO
left a comment
There was a problem hiding this comment.
Can confirm JEDI works fine with this, no linked PR is needed for lfric-jedi
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: MichaelWhitall
Code Reviewer: Oakley Brunt (@oakleybrunt)
Closes #242
When using the PC2 cloud-scheme in model-configurations which include horizontal turbulent mixing (aka 3D Smagorinsky or blended boundary-layer), currently the horizontal mixing calculation does not update the PC2 cloud-fraction prognostic consistent with cloud water content. This will be allowing the cloud water and fraction prognostics to become inconsistent with eachother, which can cause numerical problems elsewhere (e.g. increasing cloud water without increasing fraction can lead to silly large in-cloud water contents, which rain-out spuriously).
For vertical turbulent mixing (aka the boundary-layer scheme), PC2 already updates the cloud water content and fraction consistently by assuming the mixing increment acts as a homogeneous forcing. For now we will just implement the same approach for the horizontal mixing, for consistency.
I have switched on Smagorinsky + the new option in the comorph_tb test to protect the new code, hence this has changed KGOs. The KGO change to other jobs on the ex1a arises because we have split up a single line of code that multiplied the Smagorinsky increment by dt and added it back to the main increment into 2 lines - the multiplication by dt needs to happen before the PC2 code is called, and adding the increment back needs to happen after this.
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - pc2_smag/run1
Suite Information
Task Information
✅ succeeded tasks - 1310
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