Fix mistaken uses of splitting fraction#531
Open
Thomas Bendall (tommbendall) wants to merge 2 commits into
Open
Fix mistaken uses of splitting fraction#531Thomas Bendall (tommbendall) wants to merge 2 commits into
Thomas Bendall (tommbendall) wants to merge 2 commits into
Conversation
Update stable for vn3.1
James Kent (jameskent-metoffice)
approved these changes
Jun 2, 2026
James Kent (jameskent-metoffice)
left a comment
Contributor
There was a problem hiding this comment.
This ticket fixes a small bug where the wrong splitting fraction/factor was used in a few places. Luckily things cancelled out, but it is good to see it fixed. This is a very small ticket with only 4 changes and no kgo changes. I am happy we now have the correct splitting factor, and so approve this PR.
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: James Kent (@jameskent-metoffice)
Code Reviewer:
Our transport scheme is designed to use various "splittings", which divide the transport step up into substeps, and "split" vertical or horizontal steps. Each of these levels of step has its own timestep (
dt), which is set by information about the substepping and splitting.A key routine is
get_splitting_fraction, which sets the value in the denominator for the factor for that splitting, e.g. in a VHV splitting this would return 2 for the V steps and 1 for the H step.It appears that this is used incorrectly in a couple of places! Instead of dividing by this value, we multiply by this value. We have managed not to notice because the timestep fortuitously cancels out in those two cases.
This PR fixes the problem by using
get_splitting_factorinstead.Although hypothetically KGOs could be changed, they appear not to.
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - fix_splitting_fraction/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