nextsimhub / nextsimdg

neXtSIM_DG : next generation sea-ice model with DG
https://nextsim-dg.readthedocs.io/en/latest/?badge=latest
Apache License 2.0
10 stars 13 forks source link

Duration defaults #474

Closed timspainNERSC closed 6 months ago

timspainNERSC commented 6 months ago

Duration defaults

Fixes #473

With the introduction of the intermediate restart file period (issue #239), the default value from the configuration file was an empty string. This is not parsed correctly by Duration::parse().

Change the configuration default to "0", a duration of 0 seconds. This will then result in a restart file being written every timestep. So if the Duration between restart files is set to zero, instead set it to 10 000 years. I think it is safe to assume that if someone is doing a multi-10 000 year run, then they will want restart files with a shorter period than that.


Test Description

Added a test condition to ensure that Duration::parse("") throws. The single column thermodynamics configuration is intended as a test, and that is once again working, so tests this.


Documentation Impact

Added text about the default behaviour to the online help system for the relevant option.