DHI/mikeio

Dfs2 - static items (bathymetry)

stkistner opened this issue · 6 comments

Problem

When reading certain Dfs2's, e.g. model outputs from the FM egine the file often contains a static item that describes the bathymetry. This item is a perquisite in some of the processing tools or connected models (e.g. directional wave analysis or MIKE MA). When processing these files with mikeio the data is discarded, which naturally leads to problems.

Solution

Add an option to read/write the static bathy item

Alternatives considered

Using mikecore I can get around this. But we like to use mikeio for simplicity. I haven't seen any other issues related to this.

Is bathymetry the only example of where a static item is used (in practice), or are there other examples?

Is bathymetry the only example of where a static item is used (in practice), or are there other examples?

Bathymetry is the only example that I'm aware of.

The FM engine can output dfs2 in a gridded overlay. That is not a legacy output. I don't know, however, whether it contains any static bathymetry 🤔

I extracted a Dfs2 this morning from a Dfsu, and that did extract the bathy data too.

But I know this is for 1 out of 100 applications. In the meantime I've managed to re-add the bathy using mikecore, but a a mikeio implementation would be nice 😉

Let's add the bathymetry as an optional attribute to the Grid2D data structure.