Skip to main content

A package that uses the DHI dfs libraries to create, write and read dfs and mesh files.

Project description

logo

MIKE IO: input/output of MIKE files in python

Python version Full test PyPI version

Read, write and manipulate dfs0, dfs1, dfs2, dfs3, dfsu and mesh files.

Facilitates common data processing workflows for MIKE files.

For res1d and xns11 files use the related package MIKE IO 1D

Upcoming release: MIKE IO 1.0

MIKE IO 1.0 is planned to be released in May 2022 and it will have a lot of benefits to make working with dfs files easier, but it also requires some changes to your existing code. More details in the discussion page.

code example

Important changes

  • New class mikeio.DataArray which will be the main class to interact with, having these properties and methods
    • item info
    • geometry (grid coordinates)
    • methods for plotting
    • methods for aggreation in time and space
  • Indexing into a dataset e.g. ds.Surface_elevation to get a specific item, will not return a numpy array, but a mikeio.DataArray

Requirements

  • Windows or Linux operating system
  • Python x64 3.7 - 3.10
  • (Windows) VC++ redistributables (already installed if you have MIKE)

More info about dependencies

Where can I get help?

Installation

From PyPI:

pip install mikeio

Or development version:

pip install https://github.com/DHI/mikeio/archive/main.zip

Tested

MIKE IO is tested extensively. 95% total test coverage.

See detailed test coverage report below:

---------- coverage: platform linux, python 3.10.2-final-0 -----------
Name                              Stmts   Miss  Cover
-----------------------------------------------------
mikeio/__init__.py                   38      3    92%
mikeio/aggregator.py                 98      9    91%
mikeio/base.py                       26      5    81%
mikeio/custom_exceptions.py          25      6    76%
mikeio/data_utils.py                111     24    78%
mikeio/dataarray.py                 686    101    85%
mikeio/dataset.py                   695     87    87%
mikeio/dfs0.py                      278     26    91%
mikeio/dfs1.py                       61      6    90%
mikeio/dfs2.py                      186     37    80%
mikeio/dfs3.py                      202     77    62%
mikeio/dfs.py                       269     21    92%
mikeio/dfsu.py                      735     56    92%
mikeio/dfsu_factory.py               41      2    95%
mikeio/dfsu_layered.py              142     19    87%
mikeio/dfsu_spectral.py              97      8    92%
mikeio/dfsutil.py                    89      5    94%
mikeio/eum.py                      1297      4    99%
mikeio/generic.py                   399      8    98%
mikeio/helpers.py                    16      5    69%
mikeio/interpolation.py              63      2    97%
mikeio/pfs.py                        95      0   100%
mikeio/spatial/FM_geometry.py       867     80    91%
mikeio/spatial/FM_utils.py          231     19    92%
mikeio/spatial/__init__.py            4      0   100%
mikeio/spatial/crs.py                50     25    50%
mikeio/spatial/geometry.py           88     34    61%
mikeio/spatial/grid_geometry.py     334     16    95%
mikeio/spatial/spatial.py           278    181    35%
mikeio/xyz.py                        12      0   100%
-----------------------------------------------------
TOTAL                              7513    866    88%

================ 454 passed in 41.76s =================

Cloud enabled

From MIKE IO v.0.7 it is possible to run MIKE IO in your favorite cloud notebook environment e.g. Deepnote, Google Colab, etc...

DeepNote

Colab

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mikeio-1.0a2.tar.gz (139.0 kB view details)

Uploaded Source

Built Distribution

mikeio-1.0a2-py3-none-any.whl (163.7 kB view details)

Uploaded Python 3

File details

Details for the file mikeio-1.0a2.tar.gz.

File metadata

  • Download URL: mikeio-1.0a2.tar.gz
  • Upload date:
  • Size: 139.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

File hashes

Hashes for mikeio-1.0a2.tar.gz
Algorithm Hash digest
SHA256 e80695a8d47a61e4352cb0170033b0c97c67afb6fc36027d3507ac4511b411ff
MD5 f200038509f5654e3e27e5661968f47c
BLAKE2b-256 3d70329eae17b4fa45998d00d8fef26c72df4172f99e31da5778e5e26a08e608

See more details on using hashes here.

File details

Details for the file mikeio-1.0a2-py3-none-any.whl.

File metadata

  • Download URL: mikeio-1.0a2-py3-none-any.whl
  • Upload date:
  • Size: 163.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

File hashes

Hashes for mikeio-1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 c63819d02872271cc4f509d656b98de62712d600889ecf4ee3a4bf4846ea2b67
MD5 f44ad09e975ddd9331178dfbdf00e368
BLAKE2b-256 f830f3c74621f55d25e8884b9d7ec907731b0a84ed6b6d206eb807b138cbabf8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page