Skip to content

Conversation

@jwallwork23
Copy link
Contributor

@jwallwork23 jwallwork23 commented Nov 11, 2025

File behaviour for restarts and diagnostics

Fixes #935
Fixes #977
Fixes #997
Fixes #898
Merges into #999

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.

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.

In this PR, I also overhauled the createFile member function, inlining many of the setters with only a single call site.


Test Description

Tests are updated to account for the new behaviour.

TODO - to test the diagnostics are written out.

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

TODO


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

@jwallwork23 jwallwork23 self-assigned this Nov 11, 2025
@jwallwork23 jwallwork23 added bug Something isn't working enhancement New feature or request ICCS Tasks or reviews for the ICCS team labels Nov 11, 2025
@jwallwork23 jwallwork23 mentioned this pull request Nov 11, 2025
11 tasks
@jwallwork23 jwallwork23 force-pushed the issue935_xios-landmask branch from 5ae4048 to 8b5f23a Compare November 18, 2025 13:25
@jwallwork23 jwallwork23 changed the base branch from develop to issue990_xios_write-then-read-take3 November 25, 2025 13:43
@jwallwork23 jwallwork23 force-pushed the issue935_xios-landmask branch from 8b5f23a to dfa80d5 Compare November 25, 2025 13:43
Otherwise, it will be zeroed in file splits after the first
@jwallwork23 jwallwork23 force-pushed the issue990_xios_write-then-read-take3 branch from 3582343 to c16977a Compare November 25, 2025 15:30
@jwallwork23 jwallwork23 force-pushed the issue935_xios-landmask branch from dfa80d5 to 33e0a3e Compare November 25, 2025 17:33
@jwallwork23 jwallwork23 force-pushed the issue990_xios_write-then-read-take3 branch 4 times, most recently from 183435f to 279efaa Compare December 2, 2025 10:50
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