Skip to content

Conversation

jwallwork23
Copy link
Contributor

@jwallwork23 jwallwork23 commented Oct 2, 2025

Use model config in XIOS

Fixes #925
Follows #936
Second attempt following #932
Merges into #913

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
  • Updated the README or other documentation
  • Completed the pre-Request checklist below

Change Description

This PR reuses the time metadata set as part of the config set in the XIOS handler.


Test Description

For the purposes of testing, a separate Model.configureTime member function is created to avoid having to configure everything. I also needed to get the build system to create partition metadata files for 1 and 3 MPI ranks for the XIOS tests and to extend the configuration for all of them.


Documentation Impact

The XIOS doc pages are updated to reflect these changes.


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 Oct 2, 2025
@jwallwork23 jwallwork23 added the enhancement New feature or request label Oct 2, 2025
Base automatically changed from issue541_use-domain-decomp to develop October 2, 2025 16:27
@jwallwork23 jwallwork23 marked this pull request as ready for review October 2, 2025 16:39
Copy link
Collaborator

@timspainNERSC timspainNERSC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could use metadata.runLength() in one place, but otherwise this looks good.

if (periodStr.length() == 0 || periodStr == "0") {
setFileOutputFreq(fileId, stopTime - startTime);
ModelMetadata& metadata = ModelMetadata::getInstance();
setFileOutputFreq(fileId, metadata.stopTime() - metadata.startTime());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't metadata.runLength() exactly metadata.stopTime() - metadata.startTime()? (It should be)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thanks @timspainNERSC. Addressed in 326c552.

@jwallwork23 jwallwork23 merged commit 911a0ee into develop Oct 3, 2025
11 checks passed
@jwallwork23 jwallwork23 deleted the issue925_xios-timestep-start-stop-take2 branch October 3, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XIOS: Avoid duplication of timestep and start and stop times
2 participants