Right levels used regridding 265 Area cloud fraction with lfric2um - #697
Open
Steve Mullerworth (stevemullerworth) wants to merge 3 commits into
Open
Right levels used regridding 265 Area cloud fraction with lfric2um#697Steve Mullerworth (stevemullerworth) wants to merge 3 commits into
Steve Mullerworth (stevemullerworth) wants to merge 3 commits into
Conversation
Steve Mullerworth (stevemullerworth)
marked this pull request as ready for review
August 7, 2026 13:03
Steve Mullerworth (stevemullerworth)
requested a review
from Lottie Turner (mo-lottieturner)
as a code owner
August 7, 2026 13:03
28 tasks
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:
Code Reviewer:
Closes #694 where the technical issue is described in depth.
This branch ensures the correct number of layers is used for gathering LFRic data. Previously, it was assumed to be the same as the UM number of layers, which is incorrect for STASH code 265 (area cloud fraction), as can be seen by noting the corruption of the data as compared with the very similar 266 STASH code.
Where an LFRic field has more layers than the UM field, one must decide what to do. In the above case, ignoring level 1 of the LFRic field looks correct as the first two levels of the field (the two Wtheta dofs in the lowest cell) are identical. This was further checked by reviewing the input data to the um2lfric aquaplanet task that generated the input data for the lfric2um aquaplanet task: the first two levels in the field in this file are not identical and look more like the regridded data of levels 2 and 3 of the LFRic field, respectively.
Finally, um2lfric code was examined. um2lfric creates an LFRic-like array used for regridding UM data into which. It then calls a post_process routine which, for LFRic field
area_cf(which matches STASH code 265), it adds an extra level to the start of the array which is a duplicate of the first level.The KGOs for the lfric2um aquaplanet tests are changed by this branch as expected. Just the area cloud fraction is affected, as expected. The cloud fraction plots are now similar to the bulk cloud fraction plots, and the change avoids the use of the duplicated level 0 layer of the LFRic data.
Code Quality Checklist
Testing
trac.log
Several non-lfricinputs builds ran out of time due to ongoing file-system issues. As the changes are fully isolated to lfricinputs it doesn't seem worth rerunning right now.
Three lfricinputs rose-ana tasks fail, all expected and relate to the corrected STASHcode 265. There are no other differences.
Test Suite Results - lfric_apps - pr697_lfric2um_right_levels/run1
Suite Information
Task Information
❌ failed tasks - 17
⌛ waiting tasks - 68
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