Fix coupled checkpointing#376
Open
Tim Graham (timgraham-Met) wants to merge 3 commits into
Open
Conversation
28 tasks
Mike Hobson (mike-hobson)
approved these changes
May 21, 2026
Contributor
Mike Hobson (mike-hobson)
left a comment
There was a problem hiding this comment.
Like its Apps companion, this change is good enough to go on main. At a later time, we might want to see if it's possible to reduce some of the duplication between the new is_coupling_time_next and the existing is_coupling_time, but as it stands, it is easy to read and understand. It provides a logical API for the Apps code to call into.
I am happy to approve this.
Note for the code reviewer: It may not be important, but the changes in this Core PR will not break Apps. As long as the the Core PR is committed before the Apps PR, they don't have to go on at the same time.
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: Mike Hobson (@mike-hobson)
Code Reviewer: mo-marqh
Since core/apps vn3.0, coupled checkpointing has been broken in LFRic as a result of the implementation of capability to output restarts at any time in the model. In this core branch a change is implemented to allow checking of whether the next time step is a coupling time step. This is needed by lfric_apps to avoid writing a checkpoint at timesteps that are not coupling timesteps causing incorrect results.
Code Quality Checklist
Testing
There is a failure in the metadata check that doesn't seem to be linked to anything I have changed.
This has been extensively tested (and used) in GC coupled climate workflows as part of the GC6 project. Future tests will be added in lfric_atm to protect this functionality. At this time the priority is being able to reat and write checkpoints with the coupled model.
trac.log
Test Suite Results - lfric_core - core_fix_cpl_chkpt/run1
Suite Information
Task Information
❌ failed tasks - 1
⌛ waiting tasks - 1
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