Skip to content

Add theta perturbation parameters to namelist#504

Open
Adrian Lock (Adrian-Lock) wants to merge 7 commits into
MetOffice:mainfrom
Adrian-Lock:vn3.1_init_pert_nml
Open

Add theta perturbation parameters to namelist#504
Adrian Lock (Adrian-Lock) wants to merge 7 commits into
MetOffice:mainfrom
Adrian-Lock:vn3.1_init_pert_nml

Conversation

@Adrian-Lock
Copy link
Copy Markdown
Contributor

@Adrian-Lock Adrian Lock (Adrian-Lock) commented May 20, 2026

PR Summary

Sci/Tech Reviewer: Thomas Bendall (@tommbendall)
Code Reviewer: Benjamin Went (@MetBenjaminWent)

The initial random perturbations used in idealised simulations to initiate fine scale motion are hardwired in the code. Here we add them to the initial_temperature namelist so they can be varied in magnitude (theta_pert_size) and location in the vertical (between the heights theta_pert_start and theta_pert_end). Sadly the code to generate the perturbations is in lfric_core so there has to be a linked PR.

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 - test_apps_init_pert_nml_arglist_3264_all/run1

Suite Information

Item Value
Suite Name test_apps_init_pert_nml_arglist_3264_all/run1
Suite User adrian.lock
Workflow Start 2026-05-21T15:55:23
Groups Run all
Dependency Reference Main Like
casim MetOffice/casim@2026.03.2 True
jules MetOffice/jules@2026.03.2 True
lfric_apps Adrian-Lock/lfric_apps@test_apps_init_pert_nml_arglist False
lfric_core Adrian-Lock/lfric_core@tag3.1_core_init_pert_nml_arglist_3264 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 - 1511

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

@Adrian-Lock
Copy link
Copy Markdown
Contributor Author

Sorry, got ahead of myself as I'm having trouble with accessing this apps namelist from code, see MetOffice/simulation-systems#634

Copy link
Copy Markdown
Contributor

@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.

All looks good to me

@Adrian-Lock Adrian Lock (Adrian-Lock) marked this pull request as ready for review May 22, 2026 06:36
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.

Science Review

This PR adds namelist options to specify the height and magnitude of theta perturbations, which were previously hardwired. Most of the changes involve rolling the namelist option out to the feign_initial_temperature_config in unit-tests

There is nothing controversial here and I'm happy to approve.

Copy link
Copy Markdown

@mo-cjsmith mo-cjsmith left a comment

Choose a reason for hiding this comment

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

Initialisation changes look fine.

@Adrian-Lock Adrian Lock (Adrian-Lock) added this to the Summer 2026 milestone May 22, 2026
Copy link
Copy Markdown
Contributor

@DanStoneMO DanStoneMO left a comment

Choose a reason for hiding this comment

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

Tested JEDI against this and it runs fine as-is. No linked lfric-jedi PR will be needed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add theta perturbation parameters to namelist

6 participants