Skip to content

Soil levels in LFRic2UM#435

Open
Lottie Turner (mo-lottieturner) wants to merge 12 commits intoMetOffice:mainfrom
mo-lottieturner:lfric2um_soil_levels
Open

Soil levels in LFRic2UM#435
Lottie Turner (mo-lottieturner) wants to merge 12 commits intoMetOffice:mainfrom
mo-lottieturner:lfric2um_soil_levels

Conversation

@mo-lottieturner
Copy link
Copy Markdown
Contributor

@mo-lottieturner Lottie Turner (mo-lottieturner) commented Apr 16, 2026

PR Summary

Sci/Tech Reviewer: Adrian Lock (@Adrian-Lock)
Code Reviewer: svadams (@svadams)

This PR adds the functionality to handle soil multidata fields in LFRic2UM (and also sets up some of the infrastructure to handle the other kinds of multidata/pseudolevel fields). This will add new lfricinputs kgos

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 - t435_lfric2um_soil_levels/run10

Suite Information

Item Value
Suite Name t435_lfric2um_soil_levels/run10
Suite User charlotte.turner
Workflow Start 2026-04-16T16:29:57
Groups Run lfric2um', 'developer
Dependency Reference Main Like
casim MetOffice/casim@2026.03.2 True
jules MetOffice/jules@2026.03.2 True
lfric_apps mo-lottieturner/lfric_apps@lfric2um_soil_levels False
lfric_core MetOffice/lfric_core@018e40c True
moci MetOffice/moci@2026.03.2 True
SimSys_Scripts MetOffice/SimSys_Scripts@4387949 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

❌ failed tasks - 5
Task State
config_dump_checker failed
rose_ana_lfricinputs_lfric2um-pseudolevels-C48L70_N48L70_azspice_gnu_fast-debug-64bit failed
rose_ana_lfricinputs_lfric2um-pseudolevels-C48L70_N48L70_azspice_gnu_full-debug-64bit failed
rose_ana_lfricinputs_lfric2um-pseudolevels-C48L70_N48L70_ex1a_gnu_fast-debug-64bit failed
rose_ana_lfricinputs_lfric2um-pseudolevels-C48L70_N48L70_ex1a_gnu_full-debug-64bit failed
✅ succeeded tasks - 1193
⌛ 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

@mo-lottieturner Lottie Turner (mo-lottieturner) added the LFRic Inputs Changes by/affecting the LFRic Inputs project, including lfric2lfric, lfric2um, scintelapi, um2lfric label Apr 16, 2026
@mo-lottieturner Lottie Turner (mo-lottieturner) added the KGO This PR contains changes to KGO label Apr 16, 2026
@mo-lottieturner Lottie Turner (mo-lottieturner) changed the title Lfric2um soil levels Soil levels in LFRic2UM Apr 29, 2026

else if (lookup_int(lbvc) == 6) then ! Deep soil levels
! These are hardcoded to the settings in a UM dump file with 4 soil levels as
! that is currently hardcoded in elsewhere in lfric2um. If at some point that
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.

An extra "in" that isn't needed:

Suggested change
! that is currently hardcoded in elsewhere in lfric2um. If at some point that
! that is currently hardcoded **in** elsewhere in lfric2um. If at some point that

Copy link
Copy Markdown
Contributor

@Adrian-Lock Adrian Lock (Adrian-Lock) Apr 29, 2026

Choose a reason for hiding this comment

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

And if you did know where it is hardcoded "elsewhere", it would be helpful to say, as increasing soil level number is on a long-term development list and we look to be building up some technical debt in this regard

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.

I think the two ins is technically correct - it is [hardcoded in] elsewhere in lfric2um - but it does read better with one in. I'll change that. The hardcoding is in lfric2um_initialise_um_mod.f90, but I think this could easily be changed to be read in from the rose-app.conf file - #266 adds a couple of other variables being read in from there, so could easily do that there (or split that change into another ticket, more likely).

If there was another scheme added, how would they be told apart from the raw file? As in, would it still use the vertical coord type code 6, or would it have its own? If still using 6, would the only difference be the number of layers? or would there be a different flag somewhere?


[namelist:configure_lfric2um]
stash_list=2,3,150,4,389,391,392,393,394,25,265,266,267,268,26,493,221,
=20,9,279,278,281,213,508,49
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.

Just wondering if this list might be better in numerical order? Or perhaps group the stash on soil levels separately? The order currently seems arbitrary?

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.

The order corresponds to the order of the fields in the iodef.xml file - which is probably somewhat arbitrary in itself, but the easiest way to make the stashcodes human readable and check you're not missing any is to get them to follow the same order as that (2,3,150 are east, north and upward winds, so it makes logical sense to have them grouped together, despite the numbers being different)

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.

also the rose config-dump checker doesn't allow you to have separate lines for separate sections, unfortunately, otherwise I'd have done that. Feel free to have a look at the iodef file and suggest a more logical order for those fields though!

@mo-lottieturner Lottie Turner (mo-lottieturner) linked an issue May 1, 2026 that may be closed by this pull request
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 LFRic Inputs Changes by/affecting the LFRic Inputs project, including lfric2lfric, lfric2um, scintelapi, um2lfric

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LFRic2UM pseudo-levels

3 participants