https://github.com/dhi/mikeio1d
Read res1d and xns11 files.
https://github.com/dhi/mikeio1d
dhi mike1d python research
Last synced: about 2 months ago
JSON representation
Read res1d and xns11 files.
- Host: GitHub
- URL: https://github.com/dhi/mikeio1d
- Owner: DHI
- License: mit
- Created: 2021-05-05T06:33:28.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-05T06:23:55.000Z (3 months ago)
- Last Synced: 2025-04-09T21:16:56.526Z (about 2 months ago)
- Topics: dhi, mike1d, python, research
- Language: Python
- Homepage: https://dhi.github.io/mikeio1d/
- Size: 28.2 MB
- Stars: 31
- Watchers: 4
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

# MIKE IO 1D: Read MIKE 1D in python

[](https://github.com/DHI/mikeio1d/actions/workflows/full_test.yml)
[](https://badge.fury.io/py/mikeio1d)

Read, manipulate, and analyze res1d, res, resx, out, and xns11 files.
For other MIKE files (Dfs0, Dfs1, Dfs2, Dfsu,...) use the related package [MIKE IO](https://github.com/DHI/mikeio)
Most users of MIKE IO 1D will also find [MIKE+Py](https://github.com/DHI/mikepluspy) of interest.
## Requirements
* Windows, Linux (experimental)
* Python x64 3.9 - 3.13
* (Windows) [VC++ redistributables](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) (already installed if you have MIKE)
* (Linux) [.NET Runtime](https://learn.microsoft.com/en-us/dotnet/core/install/linux) (not installed by default)## Installation
From PyPI:
`pip install mikeio1d`
Linux users will need to install .NET runtime. For Ubuntu, you can install .NET runtime as follows:
`sudo apt install dotnet-runtime-8.0`
Or development version:
`pip install https://github.com/DHI/mikeio1d/archive/main.zip`
If you're on the development branch, you need .NET SDK. Ubuntu users can install these dependencies as follows:
`sudo apt install dotnet-sdk-8.0`
## Documentation
Check out the [official documentation for MIKE IO 1D](https://dhi.github.io/mikeio1d/).
## Getting started
### Read network results into a DataFrame
```python
>>> import mikeio1d
>>> res = mikeio1d.open('my_results.res1d')
>>> df = res.read()>>> df_reach = res.reaches['my_reach'].Discharge.read()
>>> df_node = res.nodes['my_node'].WaterLevel.read()
```### Read Xns11 file and plot a cross section
```python
>>> import mikeio1d# Plot section with location id 'basin_right', chainage '238.800', and topo id '1'.
>>> xns = mikeio1d.open("mikep_cs_demo.xns11")
>>> xns['basin_right', '238.800', '1'].plot()
```
Continue learning with [additional examples](https://dhi.github.io/mikeio1d/examples/res1d_basic.html).
## Where can I get help?
* Reference - [Documentation](https://dhi.github.io/mikeio1d/)
* New ideas and feature requests - [GitHub Discussions](http://github.com/DHI/mikeio1d/discussions)
* Bugs - [GitHub Issues](http://github.com/DHI/mikeio1d/issues)