Skip to content

How to read a static item from a dfs2 file #676

Answered by ecomodeller
gaspermeister asked this question in Q&A
Discussion options

You must be logged in to vote

The geometry is only related to the grid, it has no information about bathymetry.

You can read static item data using the lower level library mikecore, which MIKE IO uses (so you already have it installed).

Here is an example of reading a static item from a dfsu file:
https://github.com/DHI/mikecore-python/blob/master/tests/test_dfs_static_item.py

I suppose you should be able to do the same with a Dfs2 file, you only need to reshape the data to a proper 2d array.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@gaspermeister
Comment options

Answer selected by gaspermeister
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants