Skip to content

UM style Leonard term options - #725

Open
iboutle wants to merge 8 commits into
MetOffice:mainfrom
iboutle:um_style_leo
Open

UM style Leonard term options#725
iboutle wants to merge 8 commits into
MetOffice:mainfrom
iboutle:um_style_leo

Conversation

@iboutle

@iboutle iboutle commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

PR Summary

Sci/Tech Reviewer: Shusuke Nishimoto (@mo-snishimoto)
Code Reviewer: Erica Neininger (@ericaneininger)

2 differences from how the Leonard terms are implemented in the UM are present in LFRic:

  1. The Leonard terms increment ice in the UM. This is inconsistent with how ice is treated by other mixing processes (BL, Smagorinsky), but has a significantly beneficial effect in regional simulations. Therefore we include the option to do this under a switch, which is currently being used by RAL4.beta1
  2. The Leonard term increment is added in fast physics in the UM, compared to slow physics in LFRic. The consequences of this decision need further investigation, therefore we include the option of where to include the increments under a switch.

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 Apps rose-stem suite
  • 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)

trac.log

Test Suite Results - lfric_apps - um_style_leo/run2

Suite Information

Item Value
Suite Name um_style_leo/run2
Suite User ian.boutle
Workflow Start 2026-08-19T12:53:13
Groups Run developer', 'lfric_atm_extra
Dependency Reference Main Like
casim MetOffice/casim@2026.07.1 True
jules MetOffice/jules@2026.07.1 True
lfric_apps iboutle/lfric_apps@um_style_leo False
lfric_core MetOffice/lfric_core@2026.07.1 True
moci MetOffice/moci@2026.07.1 True
SimSys_Scripts MetOffice/SimSys_Scripts@2026.07.1 True
socrates MetOffice/socrates@2026.07.1 True
socrates-spectral MetOffice/socrates-spectral@2026.07.1 True
ukca MetOffice/ukca@2026.07.1 True

Task Information

❌ failed tasks - 7
Task State
check_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit failed
check_lfric_atm_ral3-seuk_MG_ex1a_cce_fast-debug-32bit failed
check_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit-crun1 failed
check_lfric_atm_ral3_ens-seuk_MG_ex1a_cce_fast-debug-32bit-crun1 failed
check_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit-crun1 failed
check_lfric_atm_ral3_mixmol-seuk_MG_ex1a_cce_fast-debug-32bit-crun1 failed
kgo_groups_checker failed
✅ succeeded tasks - 1360
⌛ waiting tasks - 2
Task State
housekeep_azspice waiting
housekeep_ex1a 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-modified The CLA has been modified as part of this PR - added by GA label Aug 19, 2026
@iboutle iboutle added this to the Autumn 2026 milestone Aug 19, 2026
@iboutle iboutle added the macro This PR contains a metadata upgrade macro label Aug 19, 2026
@iboutle iboutle added the KGO This PR contains changes to KGO label Aug 19, 2026
@iboutle
iboutle marked this pull request as ready for review August 20, 2026 08:50
@iboutle
iboutle requested review from allynt and removed request for a team August 20, 2026 08:50

@mo-snishimoto Shusuke Nishimoto (mo-snishimoto) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi iboutle, thank you for refactoring the um_style_leo branch in a way along with the latest LFRic source code. It looks fine to me, but I left some very minor comments.

I noticed a problem will arise after merging in unit-tests ( diffusion_momentum_flux_kernel_mod_test.pf and divergence_momentum_flux_kernel_mod_test.pf ), which are not exist in stable but only in main.
We have to modify feign_mixing_config in these unit-tests somehow in the same way as leonard_term_kl_kernel_mod_test.pf.

I wonder it is possible to modify these unit-tests when merging this branch into main, Erica Neininger (@ericaneininger) .

Comment thread science/gungho/rose-meta/lfric-gungho/HEAD/rose-meta.conf Outdated
Comment thread science/gungho/source/algorithm/diffusion/leonard_term_alg_mod.x90 Outdated
Comment thread science/gungho/source/algorithm/diffusion/leonard_term_alg_mod.x90 Outdated
@github-actions github-actions Bot removed the cla-modified The CLA has been modified as part of this PR - added by GA label Aug 28, 2026
@iboutle

iboutle commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Hi iboutle, thank you for refactoring the um_style_leo branch in a way along with the latest LFRic source code. It looks fine to me, but I left some very minor comments.

I noticed a problem will arise after merging in unit-tests ( diffusion_momentum_flux_kernel_mod_test.pf and divergence_momentum_flux_kernel_mod_test.pf ), which are not exist in stable but only in main. We have to modify feign_mixing_config in these unit-tests somehow in the same way as leonard_term_kl_kernel_mod_test.pf.

I wonder it is possible to modify these unit-tests when merging this branch into main, Erica Neininger (Erica Neininger (@ericaneininger)) .

Thanks Shusuke Nishimoto (@mo-snishimoto) - I've have applied your suggestions in c04853f. I have then also merged up to the head of main to resolve conflicts with #656. All tested and working fine.

@mo-snishimoto

Copy link
Copy Markdown
Contributor

Thank you for the fix. I confirmed what I pointed out has been addressed.
(It is good to know for me that the problem can be sorted by merging main into the branch.)
I am happy to approve and pass this PR to code review, Erica Neininger (@ericaneininger) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

KGO This PR contains changes to KGO macro This PR contains a metadata upgrade macro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants