Skip to content

API change 2022 04 22 Added simulation_initial_date option

Tuomas Kärnä edited this page Apr 22, 2022 · 3 revisions

PR #313 introduces dates to the solver object. The simulation duration can now be defined by two new options, simulation_initial_date and simulation_end_date. Both must be timezone aware datetime objects. If the initial date is set, the time units are also stored in all DiagnosticCallback hdf5 files, e.g. those generated by TimeSeriesCallback2D. The time stamps can then be converted to datetime objects with cftime.num2date. This capability is demonstrated in the North Sea tidal model demo.

It is still possible to define the simulation duration by setting simulation_end_time in seconds.

Clone this wiki locally