Skip to content

Fix coupled checkpointing#376

Open
Tim Graham (timgraham-Met) wants to merge 3 commits into
MetOffice:mainfrom
timgraham-Met:fix_cpl_chkpt
Open

Fix coupled checkpointing#376
Tim Graham (timgraham-Met) wants to merge 3 commits into
MetOffice:mainfrom
timgraham-Met:fix_cpl_chkpt

Conversation

@timgraham-Met
Copy link
Copy Markdown

@timgraham-Met Tim Graham (timgraham-Met) commented May 20, 2026

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

  • I have performed a self-review of my own code
  • My code follows the project's style guidelines
  • Comments have been included that aid understanding and enhance the readability of the code
  • My changes generate no new warnings
  • All automated checks in the CI pipeline have completed successfully

Testing

  • I have tested this change locally, using the LFRic Core rose-stem suite
  • If required (e.g. API changes) I have also run the LFRic Apps test suite using this branch
  • If any tests fail (rose-stem or CI) the reason is understood and acceptable (e.g. kgo changes)
    There is a failure in the metadata check that doesn't seem to be linked to anything I have changed.
  • I have added tests to cover new functionality as appropriate (e.g. system tests, unit tests, etc.)
  • Any new tests have been assigned an appropriate amount of compute resource and have been allocated to an appropriate testing group (i.e. the developer tests are for jobs which use a small amount of compute resource and complete in a matter of minutes)

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

Item Value
Suite Name core_fix_cpl_chkpt/run1
Suite User tim.graham
Workflow Start 2026-05-20T10:20:03
Groups Run developer
Dependency Reference Main Like
lfric_core timgraham-Met/lfric_core@fix_cpl_chkpt False
SimSys_Scripts MetOffice/SimSys_Scripts@2025.12.1 True

Task Information

❌ failed tasks - 1
Task State
validate_rose_meta failed
✅ succeeded tasks - 382
⌛ waiting tasks - 1
Task State
housekeep_azspice waiting

Security Considerations

  • I have reviewed my changes for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

Performance Impact

  • Performance of the code has been considered and, if applicable, suitable performance measurements have been conducted

AI Assistance and Attribution

  • Some of the content of this change has been produced with the assistance of Generative AI tool name (e.g., Met Office Github Copilot Enterprise, Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the Simulation Systems AI policy (including attribution labels)

Documentation

  • Where appropriate I have updated documentation related to this change and confirmed that it builds correctly

PSyclone Approval

  • If you have edited any PSyclone-related code (e.g. PSyKAl-lite, Kernel interface, optimisation scripts, LFRic data structure code) then please contact the TCD Team

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

(Please alert the code reviewer via a tag when you have approved the SR)

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • CLA compliance has been confirmed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Documentation is complete and accurate
  • Security considerations have been addressed
  • Performance impact is acceptable

@github-actions github-actions Bot added the cla-required The CLA has not yet been signed by the author of this PR - added by GA label May 20, 2026
@github-actions github-actions Bot added cla-signed The CLA has been signed as part of this PR - added by GA and removed cla-required The CLA has not yet been signed by the author of this PR - added by GA labels May 20, 2026
@timgraham-Met Tim Graham (timgraham-Met) changed the title Copied changes from FCM branch Fix coupled checkpointing May 20, 2026
Copy link
Copy Markdown
Contributor

@mike-hobson Mike Hobson (mike-hobson) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot requested a review from mo-marqh June 3, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The CLA has been signed as part of this PR - added by GA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants