Skip to content

Conversation

@jameskent-metoffice
Copy link

@jameskent-metoffice jameskent-metoffice commented Jan 21, 2026

PR Summary

Sci/Tech Reviewer: @thomasmelvin
Code Reviewer: @cameronbateman-mo

This ticket fixes a potential stability issue, where departure points can't be found for consistent tracers with FFSL transport schemes. This issue is very rare, and has only been observed once when running Climate Case Studies with very large time steps. The fix is to revert to advective form (and thus break conservation) for the tracers on this time step only.

I've put this on a switch as some users might desire conservation above all else. None of the tests in the test suites see this stability issue, so there are no kgo changes whether the switch is on or off. (I've tested it worked on the Climate Case Study that failed).

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)
  • 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)

I have run the gungho_model and lfric_atm suites with the switch set to true. As expected nothing changed and all the kgos passed. I have left the switch set to false.

trac.log

Test Suite Results - lfric_apps - advective_tracer_stability_test/run1

Suite Information

Item Value
Suite Name advective_tracer_stability_test/run1
Suite User james.kent
Workflow Start 2026-01-21T12:45:35
Groups Run developer
Dependency Reference Main Like
casim MetOffice/[email protected] True
jules MetOffice/[email protected] True
lfric_apps jameskent-metoffice/lfric_apps@advective_tracer_stability_test False
lfric_core MetOffice/[email protected] True
moci MetOffice/[email protected] True
SimSys_Scripts MetOffice/[email protected] True
socrates MetOffice/[email protected] True
socrates-spectral MetOffice/[email protected] True
ukca MetOffice/[email protected] True

Task Information

✅ succeeded tasks - 1106

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 Jan 21, 2026
@github-actions github-actions bot removed the cla-required The CLA has not yet been signed by the author of this PR - added by GA label Jan 21, 2026
@jameskent-metoffice jameskent-metoffice marked this pull request as ready for review January 21, 2026 14:53
Copy link

@thomasmelvin thomasmelvin left a comment

Choose a reason for hiding this comment

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

A couple of minor suggestions to comments strings otherwise it is all fine

compulsory=true
description=Adjusts the equation form of conservative tracer groups to
=advective form if Watkins algorithm is unable to fix large
=Lipschitz numbers for consistent transport

Choose a reason for hiding this comment

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

Can you explicitly state here that this breaks conservation

Choose a reason for hiding this comment

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

Thanks, I have made this change

'so check these values. Stopping model now to fail gracefully', &
LOG_LEVEL_ERROR &
)
if (adjust_tracer_equation) then

Choose a reason for hiding this comment

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

again, can you make it clear in the log statement that this will make the transport non-conservative

Choose a reason for hiding this comment

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

Thanks, I have made this change

Copy link

@thomasmelvin thomasmelvin left a comment

Choose a reason for hiding this comment

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

Looks good to me

@jameskent-metoffice jameskent-metoffice added the macro This PR contains a metadata upgrade macro label Jan 26, 2026
@jameskent-metoffice jameskent-metoffice added this to the Spring 2026 milestone Jan 26, 2026
Copy link
Contributor

@cameronbateman-mo cameronbateman-mo left a comment

Choose a reason for hiding this comment

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

All looks good, moving to approved.

@github-actions github-actions bot added the cla-signed The CLA has been signed as part of this PR - added by GA label Jan 28, 2026
@cameronbateman-mo
Copy link
Contributor

Apologies for all the commits having an issue with commit signature 😊

@ss421
Copy link

ss421 commented Jan 29, 2026

It looks like wee need to make a configuration update in the JEDI testing to add: adjust_tracer_equation=.false.. @DanStoneMO, can you make a linked JEDI update for this? Thanks.

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 macro This PR contains a metadata upgrade macro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants