Skip to content

Linear and adjoint boundary layer physics#182

Merged
mo-marqh merged 144 commits intoMetOffice:mainfrom
tom-j-h:tlad_boundary_layer
Feb 24, 2026
Merged

Linear and adjoint boundary layer physics#182
mo-marqh merged 144 commits intoMetOffice:mainfrom
tom-j-h:tlad_boundary_layer

Conversation

@tom-j-h
Copy link
Contributor

@tom-j-h tom-j-h commented Jan 26, 2026

PR Summary

Sci/Tech Reviewer: @cjohnson-pi
Code Reviewer: @mo-marqh

This development is described on an old trac ticket: https://code.metoffice.gov.uk/trac/lfric_apps/ticket/682. This includes many links to the details of the scheme, as well as plots of results. In particular, https://wwwspice/~tim.payne/docs/4D-Var/PF/TL_BL_2025/TL_BL_2025.html has links to relevant VSDP documents.

Development was done by Tim Payne - I am simply taking the old fcm branch and creating this GitHub PR.

PLEASE NOTE - this is a follow-on to #163. The branch was created from #163's branch in my fork, but I can't make a PR into that branch because then I would be stuck in my fork. So, to look at the actual changes relevant to this PR alone, look at the diff of this branch with #161's branch: tom-j-h/lfric_apps@jelf_C224_adjoint_tests...tom-j-h:lfric_apps:tlad_boundary_layer

PLEASE ALSO NOTE - #163 is blocked by #161 which is blocked by #156 which relies on MetOffice/lfric_core#227, so when testing, I used this Core branch.

The change includes new files to be added to BIG_DATA_DIR - see paths to files in /data/users/tim.payne/ in changes. Essentially it is just:
/data/users/tim.payne/lfric_apps/files/final_ls_with_land.nc (on SPICE)
/data/users/tim.payne/lfric_apps/files/final_2021060200-2021060207.nc (on EX, for weekly C224 test)

Also need KGO update for this weekly test: https://cylchub/services/cylc-review/taskjobs/tom.hill/?suite=tlad_boundary_layer-linear_model_ex1a_weekly%2Frun3

Test branch: https://github.com/tom-j-h/lfric_apps/tree/tlad_boundary_layer-test

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 Core rose-stem suite
  • If required (e.g. API changes) I have also run the LFRic Apps test suite using this branch
  • 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 - tlad_boundary_layer-developer/run20

Suite Information

Item Value
Suite Name tlad_boundary_layer-developer/run20
Suite User tom.hill
Workflow Start 2026-01-29T19:22:52
Groups Run developer
Dependency Reference Main Like
casim MetOffice/casim@2025.12.1 True
jules MetOffice/jules@2025.12.1 True
lfric_apps tom-j-h/lfric_apps@tlad_boundary_layer-test False
lfric_core MetOffice/lfric_core@bbb3d8a True
moci MetOffice/moci@2025.12.1 True
SimSys_Scripts MetOffice/SimSys_Scripts@2025.12.1 True
socrates MetOffice/socrates@2025.12.1 True
socrates-spectral MetOffice/socrates-spectral@2025.12.1 True
ukca MetOffice/ukca@2025.12.1 True

Task Information

❌ failed tasks - 12
Task State
check_jedi_lfric_tests_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit failed
check_jedi_lfric_tests_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit failed
check_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_fast-debug-64bit failed
check_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit failed
check_jedi_lfric_tests_runge-kutta-C12_ex1a_cce_fast-debug-64bit failed
check_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit failed
check_jedi_lfric_tests_tlm_forecast_tl_nwp_gal9-C12_MG_ex1a_cce_fast-debug-64bit failed
check_linear_model_nwp_gal9-C12_MG_azspice_gnu_fast-debug-64bit failed
check_linear_model_nwp_gal9-C12_MG_ex1a_gnu_fast-debug-64bit failed
check_linear_model_nwp_gal9_random-C12_MG_azspice_gnu_fast-debug-64bit failed
check_linear_model_nwp_gal9_random-C12_MG_ex1a_gnu_fast-debug-64bit failed
kgo_groups_checker failed
✅ succeeded tasks - 1099
⌛ 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

tom-j-h and others added 30 commits January 7, 2026 10:23
…j-h/lfric_apps into align_adjoint_tests_to_linear_model
@github-actions github-actions bot removed the cla-modified The CLA has been modified as part of this PR - added by GA label Feb 16, 2026
Copy link
Contributor

@DrTVockerodtMO DrTVockerodtMO left a comment

Choose a reason for hiding this comment

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

Thank you Tom for consolidating these changes, I appreciate it's quite a large task. I do have some changes that I would like addressed please.

Copy link
Contributor

@DrTVockerodtMO DrTVockerodtMO left a comment

Choose a reason for hiding this comment

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

Thank you for making the changes, looks good to me!

@tom-j-h
Copy link
Contributor Author

tom-j-h commented Feb 20, 2026

Having problems with the linear integration tests since merging in changes from #170. Working on it now. Once sorted that will be it.

@tom-j-h
Copy link
Contributor Author

tom-j-h commented Feb 20, 2026

Having problems with the linear integration tests since merging in changes from #170. Working on it now. Once sorted that will be it.

I'm really having trouble understanding this failure. I think @cjohnson-pi will be able to help but is on leave today, back Monday. Sorry to have to hold things up @mo-marqh @jennyhickson

@tom-j-h
Copy link
Contributor Author

tom-j-h commented Feb 23, 2026

Issue mentioned above now fixed. I misinterpreted what the failed test was telling me. Fix was just to include a switch that doesn't set up the land fraction field when it's not needed. Now ready for Code Review.

@mo-marqh mo-marqh force-pushed the tlad_boundary_layer branch from 23ba635 to a2de907 Compare February 24, 2026 13:21
Copy link
Member

@mo-marqh mo-marqh left a comment

Choose a reason for hiding this comment

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

this change proposal meets coding standards, is well defined and passed sci/tech review.

macros are run and KGOs updated to enable all and weekly tests

approved for main

@mo-marqh mo-marqh merged commit f9c38b5 into MetOffice:main Feb 24, 2026
13 checks passed
Copy link

@ss421 ss421 left a comment

Choose a reason for hiding this comment

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

For JEDI, we need to fix a couple of the example configurations so perhaps these could be updated with that? @tom-j-h - what is the correct path?

@DanStoneMO is doing that work so could add the correct path?

diag_stem_name='diagGungho',
ls_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354',
ls_filename='final_ls',
ls_directory='/data/users/tim.payne/lfric_apps/files',
Copy link

Choose a reason for hiding this comment

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

I know that this has been merged but I wonder if this should be updated to LFRic BIGDATA before the release?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, these should've been changed along with the rose configs. @mo-marqh could this be hotfixed?

Copy link
Member

Choose a reason for hiding this comment

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

#295 to fixup

diag_stem_name='diagGungho',
ls_directory='/data/users/lfricadmin/data/tangent-linear/Ticket354',
ls_filename='final_ls',
ls_directory='/data/users/tim.payne/lfric_apps/files',
Copy link

Choose a reason for hiding this comment

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

Here also?

@tom-j-h
Copy link
Contributor Author

tom-j-h commented Feb 26, 2026

For JEDI, we need to fix a couple of the example configurations so perhaps these could be updated with that? @tom-j-h - what is the correct path?

@DanStoneMO is doing that work so could add the correct path?

I believe the apps run there are forecast and forecast_pseudo, but those example configurations haven't been updated by this PR or earlier ones (since they don't run the TLM).

mo-marqh added a commit to mo-marqh/lfric_apps that referenced this pull request Feb 26, 2026
@mo-marqh mo-marqh mentioned this pull request Feb 26, 2026
28 tasks
james-bruten-mo pushed a commit that referenced this pull request Feb 26, 2026
@ss421
Copy link

ss421 commented Feb 26, 2026

For JEDI, we need to fix a couple of the example configurations so perhaps these could be updated with that? @tom-j-h - what is the correct path?
@DanStoneMO is doing that work so could add the correct path?

I believe the apps run there are forecast and forecast_pseudo, but those example configurations haven't been updated by this PR or earlier ones (since they don't run the TLM).

Looks like its been fixed by another PR. Was just suggesting that they are updated while Dan was updating other configs but that is no longer needed :-)

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.

Linear and adjoint boundary layer physics scheme

7 participants