import mikeio
ds = mikeio.read("../data/oresundHD_run1.dfsu")
ds.geometryFlexible Mesh Geometry: Dfsu2D
number of nodes: 2046
number of elements: 3612
projection: UTM-33
Dfsu and mesh files are both flexible mesh file formats used by MIKE 21/3 engines. The .mesh file is an ASCII file for storing the flexible mesh geometry. The .dfsu file is a binary dfs file with data on this mesh. The mesh geometry is available in a .dfsu file as static items.
For a detailed description of the .mesh and .dfsu file specification see the flexible file format documentation.
The mesh geometry in a .mesh or a .dfsu file consists of a list of nodes and a list of elements.
Each node has:
Each element has:
In MIKE Zero, node ids, element ids and layer ids are 1-based. In MIKE IO, all ids are 0-based following standard Python indexing. That means, as an example, that when finding the element closest to a point its id will be 1 lower in MIKE IO compared to examining the file in MIKE Zero.
MIKE IO has Flexible Mesh Geometry classes, e.g. GeometryFM2D, containing the list of node coordinates and the element table which defines the mesh, as well as a number of derived properties (e.g. element coordinates) and methods making it convenient to work with the mesh.
If a .dfsu file is read with mikeio.read, the returned Dataset ds will contain a Flexible Mesh Geometry geometry. If a .dfsu or a .mesh file is opened with mikeio.open, the returned object will also contain a Flexible Mesh Geometry geometry.
Flexible Mesh Geometry: Dfsu2D
number of nodes: 2046
number of elements: 3612
projection: UTM-33
MIKE IO has Dfsu classes for .dfsu files and a Mesh class for .mesh files which both have a mikeio.spatial.GeometryFM2D/mikeio.spatial.GeometryFM3D accessible through the ´geometry´ accessor.
The following dfsu file types are supported by MIKE IO.
When a dfsu file is opened with mikeio.open() the returned dfs object will be a specialized class Dfsu2DH, Dfsu3D, Dfsu2DV, or DfsuSpectral according to the type of dfsu file.
The layered files (3d, 2d/1d vertical) can have both sigma- and z-layers or only sigma-layers.
In most cases values are stored in cell centers and vertical (z) information in nodes, but the following values types exists:
The geometry (bathymetry) can be visualized in various ways.
The data can be visualized in a similar way.