MIKE IO 1D: input/output of MIKE 1D files in Python

Python version PyPI version

Read, manipulate, and analyze res1d, res, resx, out, and xns11 files.

For other MIKE files (dfs0, dfs1, dfs2, dfsu, and mesh files), refer to MIKE IO

Warning

MIKE IO 1D is under development and could be subject to changes.

Requirements

  • Windows, Linux (experimental)
  • Python x64 3.9 - 3.12
  • (Windows) VC++ redistributables (already installed if you have MIKE)
  • (Linux) .NET Runtime (not installed by default)

Installation

pip install mikeio1d

Linux users will need to install .NET runtime. If you’re on the development branch, you need .NET SDK. Ubuntu users can install these dependencies as follows:

sudo apt install dotnet-runtime-8.0
sudo apt install dotnet-sdk-8.0

Getting started

from mikeio1d import Res1D

res = Res1D("data/network.res1d")
df = res.read()
df.head()
WaterLevel:1 WaterLevel:2 WaterLevel:3 WaterLevel:4 WaterLevel:5 WaterLevel:6 WaterLevel:7 WaterLevel:8 WaterLevel:9 WaterLevel:10 ... Discharge:99l1:22.2508 WaterLevel:9l1:0 WaterLevel:9l1:10 Discharge:9l1:5 WaterLevel:Weir:119w1:0 WaterLevel:Weir:119w1:1 Discharge:Weir:119w1:0.5 WaterLevel:Pump:115p1:0 WaterLevel:Pump:115p1:82.4281 Discharge:Pump:115p1:41.214
1994-08-07 16:35:00.000 195.052994 195.821503 195.8815 193.604996 193.615005 193.625000 193.675003 193.764999 193.774994 193.804993 ... 0.000002 193.774994 193.764999 0.000031 193.550003 188.479996 0.0 193.304993 195.005005 0.0
1994-08-07 16:36:01.870 195.052994 195.821701 195.8815 193.604996 193.615005 193.625320 193.675110 193.765060 193.775116 193.804993 ... 0.000002 193.775070 193.765060 0.000031 193.550003 188.479996 0.0 193.306061 195.005005 0.0
1994-08-07 16:37:07.560 195.052994 195.821640 195.8815 193.604996 193.615005 193.625671 193.675369 193.765106 193.775513 193.804993 ... 0.000002 193.775391 193.765106 0.000033 193.550034 188.479996 0.0 193.307144 195.005005 0.0
1994-08-07 16:38:55.828 195.052994 195.821503 195.8815 193.604996 193.615005 193.626236 193.675751 193.765228 193.776077 193.804993 ... 0.000002 193.775894 193.765228 0.000037 193.550079 188.479996 0.0 193.308884 195.005005 0.0
1994-08-07 16:39:55.828 195.052994 195.821503 195.8815 193.604996 193.615005 193.626556 193.675949 193.765335 193.776352 193.804993 ... 0.000002 193.776154 193.765335 0.000039 193.550095 188.479996 0.0 193.309860 195.005005 0.0

5 rows × 495 columns

Read more in the getting started guide.

Where can I get help?