Skip to content

Read access xml#337

Open
mo-marqh wants to merge 12 commits intoMetOffice:mainfrom
mo-marqh:readAccessXML
Open

Read access xml#337
mo-marqh wants to merge 12 commits intoMetOffice:mainfrom
mo-marqh:readAccessXML

Conversation

@mo-marqh
Copy link
Member

@mo-marqh mo-marqh commented Mar 5, 2026

PR Summary

Sci/Tech Reviewer:
Code Reviewer: @svadams

This change introduces XIOS good practice to the definition of fields to be read within XIOS XML config files.

Specifically, the use of read_access=".TRUE." is recommended for all fields being read.

This is implemented in lfric_apps in different ways, some changes have already been applied to lfric_core to facilitate this, but many XML files are read directly and used by XIOS client programmes, such as lfric_atm

whilst good practice for using XIOS2, the use of read_access=".TRUE." is mandatory for future adoption of XIOS3.
This change is supposed to be fully backwards compatible, but there are problems with a small number of changes, reverted in cca3a53

this should be understood and documented prior to adoption of this change.

If it is fully backwards compatible, then this can be adopted for XIOS2 use and make evaluation and testing of XIOS3 easier.

Note also that there is a change to the memory overhead for a small number of lfric_atm jobs that run in attached mode, on the shared queue on EX1A:

s/24GB/36GB  run_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_production-32bit
s/24GB/36GB  run_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_cce_fast_debug-32bit
s/24GB/36GB  run_lfric_atm_nwp_gal9_coarse_aero_threaded-C48_MG_ex1a_gnu_fast-debug-32bit
s/36GB/36GB  run_lfric_atm_nwp_gal9_debug-C48_MG_ex1a_cce_full-debug-32bit

see 116d32f
this change commit also requires more justification.

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 - readAccessXML/run3

Suite Information

Item Value
Suite Name readAccessXML/run3
Suite User mark.hedley
Workflow Start 2026-03-05T13:33:40
Groups Run all
Dependency Reference Main Like
casim MetOffice/casim@2026.03.1 True
jules MetOffice/jules@2026.03.1 True
lfric_apps mo-marqh/lfric_apps@readAccessXML False
lfric_core MetOffice/lfric_core@2026.03.1 True
moci MetOffice/moci@2026.03.1 True
SimSys_Scripts MetOffice/SimSys_Scripts@2026.03.1 True
socrates MetOffice/socrates@2026.03.1 True
socrates-spectral MetOffice/socrates-spectral@2026.03.1 True
ukca MetOffice/ukca@2026.03.1 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

@ss421
Copy link

ss421 commented Mar 5, 2026

@DanStoneMO would you be able to try out this change in JEDI? I don't believe there is a dependency on this update but it would be useful to try it out in case there are issues that we could get help with.

Copy link
Contributor

@svadams svadams left a comment

Choose a reason for hiding this comment

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

Basically all straightforward changes, there are a couple of xml configurations that I don't think need read access - see my comments on the files


<file id="lfric_initial" name="lfric_initial" output_freq="1ts" convention="UGRID" enabled=".TRUE.">
<field_group id="initial_dynamics_fields" freq_op="1ts" operation="once" enabled=".TRUE." >
<field_group id="initial_dynamics_fields" freq_op="1ts" operation="once" enabled=".TRUE." read_access=".TRUE." >
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think read access is needed here as this configuration is for writing initial conditions files

Copy link
Member Author

Choose a reason for hiding this comment

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

agreed & reverted

Copy link
Member Author

Choose a reason for hiding this comment

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


<!-- File definition for checkpoint write timeseries output -->
<file id="lfric_checkpoint_write" name="lfric_checkpoint_write" mode="write" output_freq="1ts" convention="UGRID" enabled=".TRUE." timeseries="both">
<field_group read_access=".TRUE.">
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think read access is needed here as this configuration is for writing a checkpoint

Copy link
Member Author

Choose a reason for hiding this comment

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

agreed & reverted

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
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.

This all looks fine to me

@DanStoneMO
Copy link
Contributor

DanStoneMO commented Mar 10, 2026

I have a branch with accompanying changes in JEDI. Once this is brought back up to date, I will test and link the PR.

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