Dfs1 - Read

import mikeio
ds = mikeio.read("../tests/testdata/random.dfs1")
ds
<mikeio.Dataset>
dims: (time:100, x:3)
time: 2012-01-01 00:00:00 - 2012-01-01 00:19:48 (100 records)
geometry: Grid1D (n=3, dx=100)
items:
  0:  testing water level <Water Level> (meter)
ds.geometry
<mikeio.Grid1D>
x: [0, 100, 200] (nx=3, dx=100)
da = ds["testing water level"]
da.plot();

da.isel(x=0).plot(title="First");

da.isel(x=-1).plot(title="Last");

Export a single point from the Dfs1 to Dfs0

da.isel(x=0).to_dfs("random_0.dfs0")
mikeio.read("random_0.dfs0")[0].plot();

import os
os.remove("random_0.dfs0")