Metadata-Version: 2.4
Name: mikeio1d
Version: 1.2.1a2
Summary: A package that uses the DHI MIKE1D .NET libraries to read res1d and xns11 files.
Project-URL: Homepage, https://github.com/DHI/mikeio1d
Project-URL: Bug Tracker, https://github.com/DHI/mikeio1d/issues
Author-email: Gediminas Kirsanskas <geki@dhigroup.com>
License: MIT License
        
        Copyright (c) 2021 DHI
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Requires-Dist: matplotlib
Requires-Dist: mikecore; platform_system == 'Linux'
Requires-Dist: numpy
Requires-Dist: pandas>=2.1.0
Requires-Dist: pythonnet>=3.0.0
Provides-Extra: all
Requires-Dist: geopandas; extra == 'all'
Requires-Dist: matplotlib; extra == 'all'
Provides-Extra: dev
Requires-Dist: folium; extra == 'dev'
Requires-Dist: geopandas; extra == 'dev'
Requires-Dist: hatch; extra == 'dev'
Requires-Dist: jupyterlab; extra == 'dev'
Requires-Dist: mapclassify; extra == 'dev'
Requires-Dist: matplotlib; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: docs
Requires-Dist: griffe==1.5.1; extra == 'docs'
Requires-Dist: quarto-cli==1.6.37; extra == 'docs'
Requires-Dist: quartodoc==0.9.1; extra == 'docs'
Provides-Extra: notebooks
Requires-Dist: folium; extra == 'notebooks'
Requires-Dist: geopandas; extra == 'notebooks'
Requires-Dist: ipykernel; extra == 'notebooks'
Requires-Dist: mapclassify; extra == 'notebooks'
Requires-Dist: matplotlib; extra == 'notebooks'
Requires-Dist: nbconvert; extra == 'notebooks'
Requires-Dist: nbformat; extra == 'notebooks'
Provides-Extra: test
Requires-Dist: ipykernel; extra == 'test'
Requires-Dist: matplotlib; extra == 'test'
Requires-Dist: nbconvert; extra == 'test'
Requires-Dist: nbformat; extra == 'test'
Requires-Dist: pyarrow; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Description-Content-Type: text/markdown

![logo](https://raw.githubusercontent.com/DHI/mikeio1d/main/images/logo/MIKE-IO-1D-Logo-Pos-RGB-nomargin.png)
# MIKE IO 1D: Read MIKE 1D in python
 ![Python version](https://img.shields.io/pypi/pyversions/mikeio1d.svg)
 [![Full test](https://github.com/DHI/mikeio1d/actions/workflows/full_test.yml/badge.svg)](https://github.com/DHI/mikeio1d/actions/workflows/full_test.yml)
[![PyPI version](https://badge.fury.io/py/mikeio1d.svg)](https://badge.fury.io/py/mikeio1d)
![OS](https://img.shields.io/badge/OS-Windows%20%7C%20Linux-blue)
![Downloads](https://img.shields.io/pypi/dm/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()
```
![Geometry](https://raw.githubusercontent.com/DHI/mikeio1d/main/images/xns11_geometry.png)

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) 
