Repository navigation
Remove check for optional diagnostic data array - #49
Merged
James Bruten (james-bruten-mo) merged 7 commits intoOct 22, 2026
Merged
Conversation
… pointers to internal arrays only if any diags required in current call.
Mohit Dalvi (mcdalvi)
requested a review
from Luke Abraham (theabro)
as a code owner
September 17, 2026 10:58
8 of 28 tasks
Contributor
There was a problem hiding this comment.
Looks good to me
Luke Abraham (theabro)
approved these changes
Sep 18, 2026
Luke Abraham (theabro)
left a comment
Contributor
There was a problem hiding this comment.
Many thanks - looks good to me
…f the group passed in.
Alan J Hewitt (alanjhewitt)
approved these changes
Sep 24, 2026
Alan J Hewitt (alanjhewitt)
left a comment
Contributor
There was a problem hiding this comment.
scitech approved
James Bruten (james-bruten-mo)
approved these changes
Oct 6, 2026
Collaborator
|
I've just approved, but can you add yourself to the cla here please |
James Bruten (james-bruten-mo)
merged commit Oct 22, 2026
7be5459
into
MetOffice:main
4 checks passed
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: Alan J Hewitt (@alanjhewitt)
Code Reviewer: James Bruten (@james-bruten-mo)
UKCA Diagnostics calculated via API are accessed by the parent model by passing in optional data arrays (diag_data_fullht_real, diag_data_flat_real) to ukca_step. Depending on the model/ type of requests there may be no diagnostics to be obtained at all, or on some timesteps. This information is passed to API via an earlier call to ukca_update_diagnostic_requests.
However, in SET_DIAG_PTRS_1D/3D_DOMAIN, there is an additional check that raises an error when the data arrays above are passed in but no diagnostics required in that call (which is a perfectly valid situation).
The error is encountered while requesting sample diagnostics from LFRic. It looks like the UM test/ real configurations had at least one diagnostic of each flat/fullht type requested on every timestep and hence did not encounter the issue so far.
This PR will remove the checks, and set up the pointers to internal diag arrays only when diagnostics are actually needed.
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
Testing
trac.log
Test Suite Results - um - vn14.2_update_ukca_rev/run2
Suite Information
Approvals
Code Owners
Config Owners
No UM Config Owners Required
Task Information
✅ succeeded tasks - 1306
Security Considerations
Performance Impact
performance measurements have been conducted
AI Assistance and Attribution
Documentation
Sci/Tech Review
Please alert the code reviewer via a tag when you have approved the SR
Code Review