[x] Implemented the source code change that satisfies the tests
[x] Documented the feature by providing worked example
[x] Updated the README or other documentation
[x] Completed the pre-Request checklist below
Change Description
This PR addresses a few minor concerns:
XIOS interface methods related to output frequency and split frequency now work with nextSIM-DG's Duration objects, rather than accepting XIOS' duration strings, which differ in confusing ways.
Implement private methods for converting between XIOS and nextSIM-DG's time duration formats.
Implement a private method for converting between C and C++ string formats, since this is done repeatedly in the XIOS interface.
Disallow "PY-M-DTH:M:S"-style input to Duration. Namely, do not allow months to be specified because they have arbitrary length and the convention does not align with XIOS, which could cause confusion.
Test Description
Unit tests are updated accordingly. I also thought it would be a good idea to test more rigorously that durations with different units are treated appropriately.
Pre-Request Checklist
[x] 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
[x] No new warnings are generated
[x] The documentation has been updated (or an issue has been created to track the corresponding change)
[x] Methods and Tests are commented such that they can be understood without having to obtain additional context
[x] This PR/Issue is labelled as a bug/feature/enhancement/breaking change
[x] File dates have been updated to reflect modification date
[x] This change conforms to the conventions described in the README
XIOS duration handling
Closes #628 Closes #636
Task List
Change Description
This PR addresses a few minor concerns:
Duration
objects, rather than accepting XIOS' duration strings, which differ in confusing ways."PY-M-DTH:M:S"
-style input toDuration
. Namely, do not allow months to be specified because they have arbitrary length and the convention does not align with XIOS, which could cause confusion.Test Description
Unit tests are updated accordingly. I also thought it would be a good idea to test more rigorously that durations with different units are treated appropriately.
Pre-Request Checklist