Skip to content

Higher-order Orography#180

Draft
tommbendall wants to merge 110 commits intoMetOffice:mainfrom
tommbendall:TBendall/HighOrderOrog
Draft

Higher-order Orography#180
tommbendall wants to merge 110 commits intoMetOffice:mainfrom
tommbendall:TBendall/HighOrderOrog

Conversation

@tommbendall
Copy link
Contributor

@tommbendall tommbendall commented Jan 23, 2026

PR Summary

Sci/Tech Reviewer: @atb1995
Code Reviewer:

This PR implements the capability to represent orography with higher-order finite elements. This allows the heights of cell centres to be match the values defined in the orography ancillary files, and avoids loss of power in the orography from the process of averaging from W3 to W0 points. This has shown a significant improvement in NWP scores.

Please See

This branch is built on the changes in #277 and #179, and until those PRs are merged, the diff on this PR will also include the changes from those branches. I have created PRs in my own fork to show useful diffs for reviewing:

Linked-To

  • there will need to be a linked JEDI-LFRic PR

Blocked-By

This branch includes the changes from #277 and #179, which are necessary to use the increased coordinate order efficiently.

Details

The changes in this PR can be summarised as:

  1. Ensure that the surface_altitude field has a degree that is specified through a new namelist option (and is not inherited from element_order)
  2. Reorganise orography namelist, to make this more coherent by:
  • moving n_orog_smooth into the orography namelist from initialization
  • moving w0_orography_mapping into the orography namelist and renaming it as w0_multigrid_mapping
  • introducing the orography_order option
  1. Set coord_order=2, orography_order=2 and w0_multigrid_mapping=.true. as default for the gungho_model, lfric_atm, lfric_coupled, linear_model and jedi_lfric_tests apps (which updates KGOs)
  2. science/gungho/source/orography/assign_orography_field_mod.F90 is directly passed surface_altitude_w0. Previously the W3 field was passed in here, which meant that the mapping from W3 to W0 and a deep halo exchange were duplicated for setting the orography for both the prime and shifted meshes
  3. science/gungho/source/orography/setup_orography_alg_mod.x90: this is the most significant coding change, as this file has been reorganised to ensure that:
  • the surface_altitude_w0 field has the appropriate element order
  • the restriction/prolongation to form the surface_altitude fields on other meshes is handled appropriately with the new option

Results

Plots from the gungho_model and lfric_atm test suites for the changes in this PR are shown in the following PDFs. The only significant difference comes in the gungho_model DCMIP mountain test, which shows that the mountain is now being resolved properly.

The use of quadratic coordinate order has shown considerable improvement in NWP scores. For results, see:

Some timing results are shown in the following table. The change to use coord_order=2 will increase costs for the calculation of the runtime constants, and parts of the timestep that use chi: map_physics_fields and the conversions between the W2 wind field and Cartesian components for transport, but this table shows that the increase in runtime is small (1-3% of timestepping cost) and should be acceptable for the level of scientific improvement.

timestepping vn3.1: coord_space='Wchi', coord_order=1 #179: coord_space='Wtheta', coord_order=1 #180: coord_space'Wtheta', coord_order=2
UKV 312.62 312.38 324.05
C48 climate 333.72 335.41 343.26
C224 221.83 220.18 222.62
C896 416.21 413.34 419.47

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

Suite Information

Item Value
Suite Name test_high_order_orog/run10
Suite User thomas.bendall
Workflow Start 2026-03-14T11:53:06
Groups Run all
Dependency Reference Main Like
casim MetOffice/[email protected] True
jules MetOffice/[email protected] True
lfric_apps tommbendall/lfric_apps@TBendall/TestHighOrderOrog False
lfric_core tommbendall/lfric_core@TBendall/CoordSpace True
moci MetOffice/[email protected] True
SimSys_Scripts MetOffice/[email protected] True
socrates MetOffice/[email protected] True
socrates-spectral MetOffice/[email protected] True
ukca MetOffice/[email protected] 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

@github-actions github-actions bot added the cla-required The CLA has not yet been signed by the author of this PR - added by GA label Jan 23, 2026
@tommbendall tommbendall added enhancement New feature or request KGO This PR contains changes to KGO macro This PR contains a metadata upgrade macro and removed cla-required The CLA has not yet been signed by the author of this PR - added by GA labels Jan 23, 2026
@tommbendall tommbendall added this to the Spring 2026 milestone Jan 23, 2026
@github-actions
Copy link

⚠️ Hello @tommbendall!

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.

@tommbendall tommbendall removed the cla-modified The CLA has been modified as part of this PR - added by GA label Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request 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.

2 participants