Enable reading for cyclic data files using temporal controller#231
Enable reading for cyclic data files using temporal controller#231EdHone wants to merge 10 commits intoMetOffice:mainfrom
Conversation
harry-shepherd
left a comment
There was a problem hiding this comment.
Just a couple of trivial changes
components/lfric-xios/integration-test/lfric_xios_cyclic_temporal_test.py
Outdated
Show resolved
Hide resolved
components/lfric-xios/integration-test/lfric_xios_cyclic_temporal_test.py
Outdated
Show resolved
Hide resolved
components/lfric-xios/integration-test/lfric_xios_cyclic_temporal_test.py
Outdated
Show resolved
Hide resolved
components/lfric-xios/integration-test/lfric_xios_cyclic_temporal_test.py
Outdated
Show resolved
Hide resolved
components/lfric-xios/integration-test/lfric_xios_cyclic_temporal_test.py
Outdated
Show resolved
Hide resolved
components/lfric-xios/integration-test/lfric_xios_temporal_test.py
Outdated
Show resolved
Hide resolved
components/lfric-xios/integration-test/lfric_xios_temporal_test.py
Outdated
Show resolved
Hide resolved
|
Thanks @harry-shepherd - all comments addressed in the latest commit |
|
I noticed something is wrong - the initial data is being read in for the timestep before the one it needs to be reading, as can be seen in the second plot above - reverting to draft to fix |
|
Requesting another sci -tech review from @harry-shepherd: The new plot above shows that we are getting the correct initial data now, when compared to the plot before |
a0f30d2 to
09090c4
Compare
mo-lucy-gordon
left a comment
There was a problem hiding this comment.
Overall the code looks good but there were a few style issues when I checked the python files with flake8 tool and there a few comments in the code requesting minor changes.
| # (C) Crown copyright 2026 Met Office. All rights reserved. | ||
| # The file LICENCE, distributed with this code, contains details of the terms | ||
| # under which the code may be used. | ||
| ############################################################################## |
There was a problem hiding this comment.
Please could you edit copyright to look like: https://metoffice.github.io/lfric_core/how_to_contribute/coding_standards/python_coding_standards.html#copyright
| ! (C) Crown copyright 2026 Met Office. All rights reserved. | ||
| ! The file LICENCE, distributed with this code, contains details of the terms | ||
| ! under which the code may be used. | ||
| !----------------------------------------------------------------------------- |
There was a problem hiding this comment.
Please could you edit copyright to look like: https://metoffice.github.io/lfric_core/how_to_contribute/coding_standards/python_coding_standards.html#copyright
|
|
||
| ! Set up separate file instance for initial read, in the case of time-varying | ||
| ! inputs that need multiple time entries present on initialisation | ||
| allocate(self%init_fields(self%window_size-1, n_fields)) |
There was a problem hiding this comment.
I can't see a corresponding deallocate for this so please could you add one?

PR Summary
Sci/Tech Reviewer: @harry-shepherd
Code Reviewer: @mo-lucy-gordon
This PR enables the handling of cyclic data files(files which we start reading again from the beginning once we reach the end) by the new lfric-xios temporal controller. The contents of this PR are:
NonSync) which exercise this functionalityCode 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)
Some plots from the LFRic-XIOS integration tests which show that the data is being correctly digested


trac.log
Test Suite Results - lfric_core - lfric_core-230-cyclic-read/run4
Suite Information
Task Information
✅ succeeded tasks - 372
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