Skip to content

Enable jedi_lfric to run lfric_atm forecast configurations#512

Open
Steven Sandbach (ss421) wants to merge 41 commits into
MetOffice:mainfrom
ss421:update_forecast_config_ifdefphys
Open

Enable jedi_lfric to run lfric_atm forecast configurations#512
Steven Sandbach (ss421) wants to merge 41 commits into
MetOffice:mainfrom
ss421:update_forecast_config_ifdefphys

Conversation

@ss421

@ss421 Steven Sandbach (ss421) commented May 20, 2026

Copy link
Copy Markdown
Contributor

PR Summary

Sci/Tech Reviewer: Matt Shin (@matthewrmshin)
Code Reviewer: Ricky Wong (@mo-rickywong)

This update requires the changes applied in: #502. This branch Update forecast config ifdefphys was created from the branch in that PR: cjohnson-pi/ifdefphys. The change being applied in this PR can be seen via: cjohnson-pi/lfric_apps@ifdefphys...ss421:lfric_apps:update_forecast_config_ifdefphys

The dependent PR #502 is now merged and the branch has been brought up-to the head of main (as of Wed 24/06) and retested via lfric-jedi with PR's included for the update as detailed below.

This PR updates jedi_lfric_tests to enable running of model forecast based on lfric_atm configurations. This requires setting UM_PHYSICS to true. The update largely follows the lfric_atm build configurations. I did not:

  1. Add the optimization scripts as it is not yet clear how this should be done. Some follow up work is required to better understand this.
  2. Update the build flags FFLAG_GROUPS because I encountered build issues that may be linked to Adjoint code which is included in the jedi_lfric library.

A small bug was fixed (removal of clock double tick).

Three new lfric_atm based configurations have been added: nwp_gal9-C12, nwp_gal9-C12_da and nwp_gal9-C48_MG. The existing gh-si-for-linear-C12 was removed as it was only a placeholder configuration and no longer required.

Note: The C48 test requires a new input file reference directly at: /home/users/darth/srv/mobb-data/lfric-jedi/lfric-diag/lfric_bg_mi-be607_C48_20210602_la354.nc currently and used in JEDI testing. Documentation on the file is included in: https://github.com/MetOffice/jjdocs/blob/38d5cfad6fd30cbea67e825775c5a20798490430/docs/Interfaces/ModelInterfaces/Input-Data/lfric-jedi-dir.rst?plain=1#L169

The applications/jedi_lfric_tests/integration-test was removed as it was problematic when integrating the UM physics and currently not testing anything useful. Furthermore, none of the other applications include integration tests.

  • linked MetOffice/mo-bundle#1127
  • linked MetOffice/lfric-jedi#1298

Note: given the nature of this change I would like to test this branch again before the branch is merged into main.

- is blocked-by #502

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)

Tested via lfric-jedi: MetOffice/mo-bundle#1127.

trac.log

Retest at: f1ee397

Test Suite Results - lfric_apps - LA_512/run6

Suite Information

Item Value
Suite Name LA_512/run6
Suite User steven.sandbach
Workflow Start 2026-06-25T00:04:31
Groups Run developer
Dependency Reference Main Like
casim MetOffice/casim@2026.03.2 True
jules MetOffice/jules@1ea67b4 True
lfric_apps ss421/lfric_apps@update_forecast_config_ifdefphys False
lfric_core MetOffice/lfric_core@b2374d3 True
moci MetOffice/moci@2026.03.2 True
SimSys_Scripts MetOffice/SimSys_Scripts@3e2998b True
socrates MetOffice/socrates@2026.03.2 True
socrates-spectral MetOffice/socrates-spectral@2026.03.2 True
ukca MetOffice/ukca@1cdb9c2 True

Task Information

✅ succeeded tasks - 1206

Previous trac.log

Test Suite Results - lfric_apps - update_forecast_config_ifdefphys/run5

Suite Information

Item Value
Suite Name update_forecast_config_ifdefphys/run5
Suite User steven.sandbach
Workflow Start 2026-05-22T13:29:40
Groups Run developer
Dependency Reference Main Like
casim MetOffice/casim@2026.03.2 True
jules MetOffice/jules@2026.03.2 True
lfric_apps ss421/lfric_apps@update_forecast_config_ifdefphys False
lfric_core MetOffice/lfric_core@2026.03.2 True
moci MetOffice/moci@2026.03.2 True
SimSys_Scripts MetOffice/SimSys_Scripts@2026.03.2 True
socrates MetOffice/socrates@2026.03.2 True
socrates-spectral MetOffice/socrates-spectral@2026.03.2 True
ukca MetOffice/ukca@2026.03.2 True

Task Information

✅ succeeded tasks - 1172

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code owner (build system) review: A few things seem off. Please explain why the are necessary.

Comment thread applications/jedi_lfric_tests/build/fortran/crayftn/fast-debug.mk
Comment thread applications/jedi_lfric_tests/build/compile_options.mk
Comment thread applications/jedi_lfric_tests/Makefile Outdated
Comment thread applications/jedi_lfric_tests/Makefile
Comment thread applications/jedi_lfric_tests/Makefile
Comment thread applications/lfric_atm/build/fortran/crayftn.mk Outdated
Comment thread applications/linear_model/build/compile_options.mk Outdated
@github-actions github-actions Bot added the cla-modified The CLA has been modified as part of this PR - added by GA label Jun 22, 2026
@ss421

Copy link
Copy Markdown
Contributor Author

⚠️ Hello Steven Sandbach (Steven Sandbach (@ss421))!

Your CLA signature was found on the base branch, but you appear to have modified the CONTRIBUTORS.md file in this PR.

Please do not edit the CONTRIBUTORS.md file. If you have already signed the CLA, revert changes to the file and your signature will be picked up.

Im not sure where this is coming from - I have not changed CONTRIBUTORS.md in this PR.

@github-actions github-actions Bot removed the cla-modified The CLA has been modified as part of this PR - added by GA label Jun 24, 2026
@ss421

Copy link
Copy Markdown
Contributor Author

Matthew Hambley (@MatthewHambley) Ive updated where possible and replied to your review comments above. The changes here is similar to the one applied in #502 and I note your comment about the general build system here: #502 (review) - I assume the same comment applies here? Can you advise if anything else needed?

Ricky Wong (@mo-rickywong) - the dependent PR #502 has been merged. I have merged the head of main yesterday and retested via the LFRic and JEDI testing. Please note that there is a file that needs to be copied to $BIGDATA.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It sounds like you've merged another ticket's changes into this branch. Please either strip that off or make sure it's merged up to the head of that branch. Otherwise the merge to trunk will go bad.

@ss421

Copy link
Copy Markdown
Contributor Author

It sounds like you've merged another ticket's changes into this branch. Please either strip that off or make sure it's merged up to the head of that branch. Otherwise the merge to trunk will go bad.

This is a branch from #502 as I need the changes from that here.

Last week (24th June), I merged in the head of main since the original base branch was committed via #502. According to the GitHub auto merge button there are no conflicts with MetOffice main. There is some of #502 history in my branch but the only way I can get rid of that is to rebase. Id rather not do that as it was quite painful merging up in the first place and I didn't think that was necessary for these PR's as the history will be squashed on commit?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just one outstanding issue.

Choose a reason for hiding this comment

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

Just spotted this on my way past. At 2MiB this is too big for the source code repository. It also seems too big for the "do anything" example. Remember, the examples are there so a new user can prove to themselves that they've compiled an executable which will "do anything." Not one which will "do something."

In light of this, is there a smaller (order a couple of KiB) version of the file which could be used. Can the need to use this file be turned off in the configuration?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This test case is based on lfric_atm and as far as I can tell there are no other suitable smaller tests. The one that was included previously was based on a gungho configuration: https://github.com/MetOffice/lfric_apps/blob/main/rose-stem/app/gungho_model/opt/rose-app-semi-implicit-for-linear.conf. It is not straight forward to support that configuration in jedi_forecasts because the base configuration has changed significantly so it was removed in favor of a more realistic case (which was being added here as the example case).

There are two options to remove the file-size issue:

  1. move the files to $BIGDATA and use a symbolic link to the files.
  2. Revert the change and put back the older configuration - the rose-stem configuration this is based on no longer exists.

In 5cee5ee I have done the later but I would prefer if it is acceptable to do the former (as in add the data and use sym-links). Can you advise on what is appropriate?

Thanks,

Steve

@ss421

Copy link
Copy Markdown
Contributor Author

Merged up to the head of main via: 79fac20. Retesting via: jedi_lfric_tests_developer group as there was lfric_atm configuration updates added since the last commit. Will follow that with a run of the full developer test-suite and will post new trac.log.

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

Labels

Linked Jedi This PR is linked to a Jedi PR - this will be managed by the DA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants