mikeio icon indicating copy to clipboard operation
mikeio copied to clipboard

Dfs2 - static items (bathymetry)

Open stkistner opened this issue 1 year ago • 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.

stkistner avatar Mar 21 '24 12:03 stkistner

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

ecomodeller avatar Mar 21 '24 12:03 ecomodeller

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.

stkistner avatar Mar 21 '24 13:03 stkistner

I am a bit hesitant if this should be part of MIKE IO, I was under the impression that Dfs2 output from HD models was legacy.

But one option could be to add the Bathymetry to the Grid2D geometry property.


From: stkistner @.> Sent: Thursday, March 21, 2024 2:58:21 PM To: DHI/mikeio @.> Cc: Henrik Andersson @.>; Comment @.> Subject: Re: [DHI/mikeio] Dfs2 - static items (bathymetry) (Issue #677)

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.

— Reply to this email directly, view it on GitHubhttps://github.com/DHI/mikeio/issues/677#issuecomment-2012375114, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAEV6RZKC6IWWKOXNIDCBX3YZLRP3AVCNFSM6AAAAABFBMT4B2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJSGM3TKMJRGQ. You are receiving this because you commented.Message ID: @.***>

ecomodeller avatar Mar 21 '24 15:03 ecomodeller

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 🤔

jsmariegaard avatar Mar 25 '24 00:03 jsmariegaard

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 😉

stkistner avatar Mar 25 '24 09:03 stkistner

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

ecomodeller avatar Mar 25 '24 10:03 ecomodeller