How to read a static item from a dfs2 file #676
-
I am trying to read data from a DFS2 file (M21 result files) and do some calculations using both dynamic and static data. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
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: 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. |
Beta Was this translation helpful? Give feedback.
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.