Open
Conversation
ukmo-juan-castillo
approved these changes
Mar 13, 2026
ukmo-juan-castillo
left a comment
There was a problem hiding this comment.
The changes match the code author's proposed solution. New tests have been added to fully check the functionality of the relevant code and they pass successfully. I personally run other tests successfully. Everything is in order and the new tests are welcome.
mo-rickywong
approved these changes
Mar 13, 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: @ukmo-juan-castillo
Code Reviewer: @cameronbateman-mo
In
global_mesh_modthere is a method (get_cell_id) that returns the cell id of a cell that is a given x- and y- distance from a starting cell id. A bug has been introduced into this routine so that if a negative x-direction distance is given, it inadvertently reverses the sense of the y-direction. This hasn't affected us so far, as our usage has only been with positive x-offsets.A fix has been agreed with the author of the change that introduced the bug (#220) that simply reverses the sense of the y-direction for negative x-direction. This maintains the functionality that #220 added, but also fixes the broken behaviour.
I have updated the unit tests to add tests that would have picked up this problem and made them a little tidier
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_core - fix_global_mesh_bug/run1
Suite Information
Task Information
✅ succeeded tasks - 384
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