reducing post-processing of XIOS output#204
Conversation
06cc787 to
4ed0042
Compare
There was a problem hiding this comment.
Sci/Tech review
Overall a well-formatted change that dramatically reduces our dependency on file post-processing in the majority of cases which will enhance the resilience of our code. It's good that the flag for post-processing is decided on a file-by-file basis.
- Could you please re-name the PR to more accurately reflect the scope of the changes (i.e. reducing post-processing of XIOS output) as there are more changes that need to be made before we can run with XIOS3.
- It would also be good to see a side-by-side comparison of the NetCDF headers of output files (say from C12 NWP runs) to confirm that the contents are similar (this can be handled on the linked ticket in #lfric_apps#90)
- It would be nice to implement an integration test which confirm that the file format is correct when the frt scalar is incuded in the iodef.xml - I'm happy if you want to create this as a separate issue
4ed0042 to
3b37e49
Compare
Mike Hobson (mike-hobson)
left a comment
There was a problem hiding this comment.
I'm tagged on this as the code owner for infrastructure/utilities - so I've only looked at lfric_core_version_mod.F90.
The file has no preprocessor directives in it, so the filename should really have a lower case .f90 suffix.
| @@ -0,0 +1,15 @@ | |||
| !----------------------------------------------------------------------------- | |||
| ! (C) Crown copyright 2026 Met Office. All rights reserved. | |||
There was a problem hiding this comment.
We don't need dates in the copyright notice, anymore.
| ! (C) Crown copyright 2026 Met Office. All rights reserved. | |
| ! (C) Crown copyright Met Office. All rights reserved. |
| !> @brief Module containing the lfric_core version string | ||
| !> | ||
|
|
||
| MODULE lfric_core_version_mod |
There was a problem hiding this comment.
We don't do upper case keywords in LFRic - can you make all keywords lower case
| MODULE lfric_core_version_mod | ||
|
|
||
| IMPLICIT NONE | ||
|
|
There was a problem hiding this comment.
I don't like relying on Fortran's default public access. Certainly, in other constants modules in LFRic, we have a private statement just below the implicit none and then explicitly list everything we want to make public. I would prefer that to be done here, too.
|
|
||
| IMPLICIT NONE | ||
|
|
||
| CHARACTER(LEN=*), PARAMETER :: lfric_core_version_char = 'vn3.1.1_dev' |
There was a problem hiding this comment.
Do we need to put more thought into what we are using for the version? A simple string like this is fine for simple equivalence if-tests, but if we stored separate major/minor/patch values they could be more easily used in comparisons.
I realise (from the capital keywords) that this is probably taken from what we do with the UM - but could we do better?
3b37e49 to
e5d9d0e
Compare
|
i've updated the version signifier as per your comments Mike Hobson (@mike-hobson) However, in making the code paths testable within Please may I ask for a bit of advice on options and preference here? many thanks, mark |
|
Hi mark, I brought up the issues you mentioned above at our morning meeting, so the "hive mind" could have a think about it! First of all, the three integers should definitely be That leads us on to how do we unit test the But really that's no less ugly than the naive method. In the end, the team decided that the best way to go was to make your What do you think? |
e5d9d0e to
ca8f2ad
Compare
|
thank you Mike Hobson (@mike-hobson) i have re-implemented, based on this feedback |
…ing. functional switching; only post process on ugrid planar projected. XIOS3 compatibility.
ca8f2ad to
5913750
Compare
PR Summary
Sci/Tech Reviewer: Ed Hone (@EdHone)
Code Reviewer: Erica Neininger (@ericaneininger)
This PR refactors the metadata manipulation that is currently done within a file post processing function.
Only one post processing operation remains, which is only needed in the edge case of a limited area model using projected coordinates. This may be able to be done with XIOS in future, but right now this remains a feature gap.
For all other metadata specifications, these are implemented using XIOS, and removed from post processing.
This also removes the need for MPI
init_wait()calls from most usage patterns.This change introduces a soft requirement for new XML configuration, forecast reference times will only be output if an appropriately named scalar is provided, normally through XML configuration files (see linked PR)
Code Quality Checklist
(Some checks are automatically carried out via the CI pipeline)
style guidelines
readability of the code
Testing
using this branch
acceptable (e.g. kgo changes)
tests, unit tests, etc.)
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_core - xios3-compatibility-stable3/run8
Suite Information
Task Information
✅ succeeded tasks - 390
Security Considerations
Performance Impact
performance measurements have been conducted
AI Assistance and Attribution
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
confirmed that it builds correctly
PSyclone Approval
interface, optimisation scripts, LFRic data structure code) then please
contact the
tooscollabdevteam@metoffice.gov.uk
Sci/Tech Review
Please alert the code reviewer via a tag when you have approved the SR
Code Review