Skip to content

Changes to apps as a result of decoupling base_mesh_config geology / topology enumerations - #757

Open
Ricky Wong (mo-rickywong) wants to merge 12 commits into
MetOffice:mainfrom
mo-rickywong:AppsDecoupleGeoTop
Open

Ricky Wong (mo-rickywong) wants to merge 12 commits into
MetOffice:mainfrom
mo-rickywong:AppsDecoupleGeoTop

Conversation

@mo-rickywong

@mo-rickywong Ricky Wong (mo-rickywong) commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

PR Summary

Sci/Tech Reviewer: Thomas Bendall (@tommbendall)
Code Reviewer: mo-lucy-gordon

Lfric core provides a means of extracting the correct geometry / topology enumerations by querying the mesh the code is operating on, rathe than incorrectly querying base_mesh_config. This PR updates apps code to use the newer functionality.

Linked PRs

This PR is blocking

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

Suite Information

Item Value
Suite Name AppsDecoupleGeoTop/run1
Suite User ricky.wong
Workflow Start 2026-09-03T07:45:36
Groups Run developer
Dependency Reference Main Like
casim MetOffice/casim@2026.07.1 True
jules MetOffice/jules@2026.07.1 True
lfric_apps mo-rickywong/lfric_apps@AppsDecoupleGeoTop False
lfric_core mo-rickywong/lfric_core@DecoupleGeoTop True
moci MetOffice/moci@2026.07.1 True
SimSys_Scripts MetOffice/SimSys_Scripts@77a5166 True
socrates MetOffice/socrates@2026.07.1 True
socrates-spectral MetOffice/socrates-spectral@2026.07.1 True
ukca MetOffice/ukca@9fc2b6d True

Task Information

✅ succeeded tasks - 1218

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 HPC Optimisation 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

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

JEDI runs fine with this, no linked PR needed

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

Adjoint changes look good, thanks!

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.

As with the linked core PR, I don't have really have any issues with the code beyond some requests to align some import statements.

I do wonder if it would've made more sense to make the change here after geometry and topology were accessed passed as kernel arguments... After this PR is merged, we're going to have a slightly confusing situation that in some kernels the geometry/topology are imported from base_mesh_config_mod but their values will come from mesh_mod. But now you've done the work, it may as well go ahead!

PS: there is also a typo in the title of this PR too

Comment thread science/gungho/source/algorithm/transport/common/flux_precomputations_mod.x90 Outdated
Comment thread science/gungho/source/algorithm/transport/sl/horizontal_sl_advective_alg_mod.x90 Outdated
Comment thread science/gungho/source/algorithm/transport/ffsl/ffsl_hori_alg_mod.x90 Outdated
Comment thread science/gungho/source/configuration/check_configuration_mod.F90 Outdated
Comment thread science/gungho/source/initialisation/analytic_density_profiles_mod.F90 Outdated
Comment thread science/gungho/source/kernel/limited_area/create_w3mask_lbc_kernel_mod.F90 Outdated
Comment thread science/gungho/source/kernel/limited_area/create_wthetamask_blend_kernel_mod.F90 Outdated
Comment thread science/gungho/source/kernel/limited_area/create_wthetamask_kernel_mod.F90 Outdated
Comment thread science/gungho/source/kernel/limited_area/create_wthetamask_lbc_kernel_mod.F90 Outdated
Comment thread science/linear/source/algorithm/transport/ffsl/tl_ffsl_hori_alg_mod.x90 Outdated

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

LGTM

@mo-rickywong

Ricky Wong (mo-rickywong) commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

As with the linked core PR, I don't have really have any issues with the code beyond some requests to align some import statements.

I do wonder if it would've made more sense to make the change here after geometry and topology were accessed passed as kernel arguments... After this PR is merged, we're going to have a slightly confusing situation that in some kernels the geometry/topology are imported from base_mesh_config_mod but their values will come from mesh_mod. But now you've done the work, it may as well go ahead!

PS: there is also a typo in the title of this PR too

As explained, changes here are to reflect the clearing out in LFRic core module scope usage. Changes have been made so that lfric_apps continues pass the test-suite. This is a transitional PR, and was split off from (Tranche 1) MetOffice/lfric_core#440. The remaining changes to LFRic apps which are required to decouple code from module scope are significant even after Tranche 2 which finishes clearing out LFRic Core.

…tations_mod.x90

Co-authored-by: Thomas Bendall <14180399+tommbendall@users.noreply.github.com>
…ective_alg_mod.x90

Co-authored-by: Thomas Bendall <14180399+tommbendall@users.noreply.github.com>
…od.x90

Co-authored-by: Thomas Bendall <14180399+tommbendall@users.noreply.github.com>
…g_mod.x90

Co-authored-by: Thomas Bendall <14180399+tommbendall@users.noreply.github.com>
@mo-rickywong

Copy link
Copy Markdown
Contributor Author

import alignments done

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code owner (driver) review: Looks good. The geometry/topology information is now coming from the correct place and it tidies up the code as well.

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.

Thanks for making those changes. mo-lucy-gordon this is ready for code review

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.

7 participants