DHI / mikeio

Read, write and manipulate dfs0, dfs1, dfs2, dfs3, dfsu and mesh files.
https://dhi.github.io/mikeio
BSD 3-Clause "New" or "Revised" License
136 stars 53 forks source link

Accept dfs file with zero timestep #619

Closed ecomodeller closed 8 months ago

ecomodeller commented 8 months ago

Some engines, e.g. MIKE She specifies a file $\Delta t = 0.0$, which could not be correctly interpreted by MIKE IO (actually pd.DateTimeIndex).

This PR warns when $\Delta t <= 0.0$ or raises an error if number of timesteps > 1 (where the files would be invalid).

Example of reading a previously unreadable file: image

ecomodeller commented 8 months ago

Bad starting point😶