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

Durations should not accept months #636

Closed jwallwork23 closed 3 months ago

jwallwork23 commented 3 months ago

Currently, Duration("P0-1-0T0:0:0"), i.e., a 1-month duration, does not throw an error. Converting this duration to seconds gives some arbitrary number (different every time).

Of course, this is not the intended duration format. However, XIOS does accept durations in this format, so we should be careful when passing these around.

XIOS always sets the number of days in a month to 30, which could cause a lot of confusion. It would be better to just disallow such formats inside Duration.

jwallwork23 commented 3 months ago

Closed by #637.