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
138 stars 55 forks source link

Static item bathymetry #682

Open ecomodeller opened 6 months ago

ecomodeller commented 6 months ago

image

ecomodeller commented 6 months ago

Based on my first naive implementation I discovered that MIKE SHE also has some static items.

Any comments on the usefulness of those from @watermain or @Snowthe?

watermain commented 6 months ago

I´m not sure many people are aware these static items exist in mshe result files. They have some potentially useful information though.

Snowthe commented 6 months ago

Sorry, I'm not following right now - what would the static items be compared to "normal" items in a MIKE SHE dfs2/dfs3 output?

I. however, now receive a new warning message when reading e.g. a PreProcessed file (i.e. one without timesteps): C:\miniconda3\envs\py38\lib\site-packages\mikeio\dfs_dfs.py:155: UserWarning: Time step is 0.0 seconds. This must be a positive number. Setting to 1 second. warnings.warn( I do not receive the same message when reading a result file with timesteps. Is that related to your latest updates (and this issue)?

watermain commented 6 months ago

MShe just doesn´t bother to set a time step length > 0 for non-dynamic files/items. Mikeio is unhappy about this, but it just carries on. It used to be considered an error but that has been changed a while ago.

Possible static items from all output files are:

Snowthe commented 6 months ago

MShe just doesn´t bother to set a time step length > 0 for non-dynamic files/items. Mikeio is unhappy about this, but it just carries on. It used to be considered an error but that has been changed a while ago.

Yes; however the warning message is new (v2.0 beta; maybe already with v1.7?). Whereas before (v1.6.2), I simply do not get any error or warning; it just loads.

Possible static items from all output files are: [...]

So to understand - those items are all stored with a MIKE SHE dfs3 result file (e.g. the 3D_SZ.dfs3 file)? That information can also be accessed from the PreProcessed file; however it definitely would be useful to have access to it in the same file.

watermain commented 6 months ago

None of the output files has all of these static items, it´s usually only a few per file (dfs2 or dfs3), or maybe none in some cases. Also I cannot easily check if all these items are in at least one file, but these are the ones the mshe dfs layer knows about. Some of these could also be taken from the PP´ed files, others can´t.