Skip to content

Conversation

@joewallwork
Copy link
Contributor

@joewallwork joewallwork commented Dec 5, 2025

File behaviour for restarts and diagnostics (take 2)

Fixes #935
Fixes #977
Fixes #997
Fixes #898
Fixes #933
Fixes #1003
Makes #967 redundant

Task List

  • Defined the tests that specify a complete and functioning change (It may help to create a design specification & test specification)
  • Implemented the source code change that satisfies the tests
  • Documented the feature by providing worked example
  • Completed the pre-Request checklist below

Change Description

This PR fixes several things related to how restarts and diagnostics are configured with XIOS:

  1. Diagnostics are created by averaging all timesteps included in an output file dump.
  2. Restart file output frequency and split frequency are aligned so that each output file dump only includes a single timestep's worth of data.
  3. Restart files are only read once.
  4. Handle file patterns in filenames.
  5. Ensure XIOS writes the first timestep.
  6. If only one domain type is used then the output file will use x and y dimensions, rather than the versions appended with _<dimName>. We account for this by assuming that x and y imply x_dim and y_dim if encountered in an input file.

Whilst file patterns are made consistent with what's used elsewhere in nextSIM-DG, the output filenames show the range of datetimes separated by a hyphen.


Test Description

Both read and write tests are separated out for reading of different file types. This is what accounts for most of the lines changed.

Tests are updated to account for the new behaviour.

I decided to drop XiosFile_test because it is no longer needed. This meant that we could drop the annoying unittest special case.


Documentation Impact

The XIOS documentation page has been updated accordingly.


Pre-Request Checklist

  • The requirements of this pull request are fully captured in an issue or design specification and are linked and summarised in the description of this PR
  • No new warnings are generated
  • The documentation has been updated (or an issue has been created to track the corresponding change)
  • Methods and Tests are commented such that they can be understood without having to obtain additional context
  • This PR/Issue is labelled as a bug/feature/enhancement/breaking change
  • This change conforms to the conventions described in the README

@joewallwork joewallwork self-assigned this Dec 5, 2025
@joewallwork joewallwork added bug Something isn't working enhancement New feature or request ICCS Tasks or reviews for the ICCS team labels Dec 5, 2025
@joewallwork joewallwork force-pushed the issue935_xios-landmask-take2 branch from de49974 to 83d6c40 Compare December 10, 2025 12:52
@joewallwork
Copy link
Contributor Author

Closing as superseded by #1010 and #1011.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request ICCS Tasks or reviews for the ICCS team

Projects

None yet

2 participants