Take XIOS file frequency configuration from iodef.xml where possible#212
Take XIOS file frequency configuration from iodef.xml where possible#212EdHone wants to merge 8 commits intoMetOffice:mainfrom
Conversation
|
@andrewcoughtrie as you are code owner for this do you mind reviewing? Or suggesting a reviewer |
|
|
||
| from testframework import TestEngine, TestFailed | ||
| from xiostest import LFRicXiosTest | ||
| from pathlib import Path |
There was a problem hiding this comment.
| from pathlib import Path |
| class LfricXiosFullNonCyclicIodefHighFreqTest(LFRicXiosTest): # pylint: disable=too-few-public-methods | ||
| """ | ||
| Tests the LFRic-XIOS temporal reading functionality for a full set of | ||
| non-cyclic data at hieher model frequency |
There was a problem hiding this comment.
| non-cyclic data at hieher model frequency | |
| non-cyclic data at higher model frequency |
| Test the output of the context test | ||
| """ | ||
|
|
||
| expected_xios_errs = ['In file "type_impl.hpp", function "void xios::CType<T>::_checkEmpty() const [with T = xios::CDuration]", line 210 -> Data is not initialized', |
There was a problem hiding this comment.
Not entirely comfortable with hard coding XIOS error messages like this, as will this error message be unique to unset frequency (?) However, I understand that XIOS does not throw succinct and meaningful error messages ! On balance it’s better to have this test than not!
svadams
left a comment
There was a problem hiding this comment.
A couple of minor fixes plus a comment. I don't think these need to hold up the process so I'm approving and passing to code review
|
@MatthewHambley this issue is ready for your code review now. |
I've addressed those comments in a quick commit - thanks, Sam. Re. the XIOS error in the test, it;s a bit clunky but it seems like this is the expected way for the model to fall over if there's no frequency setting |
|
Converted to draft while I sort out branch CLA |
d48928b to
5f5620a
Compare
|
Sorted - over to you for CR @MatthewHambley |
PR Summary
Sci/Tech Reviewer: @svadams
Code Reviewer: @MatthewHambley
At the time of the vn3.0 release a fix was committed (#170) which fixed an issue with file I/O frequencies being set to every timestep by default. The fix, however, does not set the frequency within LFRic for these files which could result in unexpected behaviour down the line. More details on the issue can be found in #171.
This change adds some code which can fetch the frequency of the file from the iodef.xml where possible. The code will:
There are also some new tests which exercise the behaviour where the frequency is not set within the model. There are also a few QoL improvements to the
.gitignoreand some general updates to the testing framework to enable the new tests.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 - lfric_core-171-iodef-files/run1
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