Skip to content

Radaer api la side - part one run time#627

Open
Alan J Hewitt (alanjhewitt) wants to merge 51 commits into
MetOffice:mainfrom
alanjhewitt:radaer_api_la_side
Open

Radaer api la side - part one run time#627
Alan J Hewitt (alanjhewitt) wants to merge 51 commits into
MetOffice:mainfrom
alanjhewitt:radaer_api_la_side

Conversation

@alanjhewitt

@alanjhewitt Alan J Hewitt (alanjhewitt) commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

PR Summary

Sci/Tech Reviewer: Mohit Dalvi (@mcdalvi)
Code Reviewer:

I developed the original lfric to radaer functionality in 2020. Like a lot of developments back then, it was needed in a hurry and so I developed a fudged solution with technical debt.

We will need user flexibility soon to be able to run radaer with different user settings, hence this part one of two development.

In part one, I have introduced the user flexibility that is required for run time. Its already a very large change, and this is a natural break point for splitting a big PR.

Some hard-coded settings remain in the development (on the lfric_apps side the lists used by the case statement), which will be removed in the part two ticket to develop the initialisation stage functionality.

Note that all of the 32bit KGO changes result from bit level differences in addition of ukca_modal_vol_um. run2 before commit 03edbc0 replicated the previous addition method, and all KGO tests preserved original answers. In hindsight, it would have been better if i ran this test before updating the KGO files.

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 - radaer_api_la_side/run3

Suite Information

Item Value
Suite Name radaer_api_la_side/run3
Suite User alan.j.hewitt
Workflow Start 2026-07-15T05:03:24
Groups Run all
Dependency Reference Main Like
casim MetOffice/casim@2026.07.1 True
jules MetOffice/jules@2026.07.1 True
lfric_apps alanjhewitt/lfric_apps@radaer_api_la_side 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 alanjhewitt/ukca@radaer_api_ukca_side True

Task Information

✅ succeeded tasks - 1594

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

@iboutle iboutle 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 Alan,

I'd like to request a few more tests to understand the KGO change and be confident that it's okay.

I think you've narrowed the issue down to the re-writing of lines like:

  • X(r_um) = A(r_def) + B(r_def) + C(r_def) + D(r_def)

as:

  • X(r_um) = X(r_um) + A(r_def)
  • X(r_um) = X(r_um) + B(r_def)
    etc

My suspicion is that in the original method, the summation is computed at r_def precision, with the result being cast to r_um. Whilst in the new method, each separate addition will be done and cast to r_um.

Would you be able to try your new method as:

  • X(r_um) = X(r_um) + real(A, r_um)
  • X(r_um) = X(r_um) + real(B, r_um)
    etc

i.e. explicitly cast the variables being added to the required precision before the summation happens.

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

Labels

Linked UKCA This PR is linked to a MetOffice/ukca PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants