Skip to main content

Make massive MODFLOW models

Project description

https://gitlab.com/deltares/imod/imod-python/badges/master/pipeline.svg https://gitlab.com/deltares/imod/imod-python/badges/master/coverage.svg https://mybinder.org/badge_logo.svg

Work with iMOD MODFLOW models in Python.

Documentation: https://imod.xyz/

Source code: https://gitlab.com/deltares/imod/imod-python

Getting started

import imod

# read and write IPF files to pandas DataFrame
df = imod.ipf.read('wells.ipf')
imod.ipf.save('wells-out.ipf', df)

# get all calculated heads in a xarray DataArray
# with dimensions time, layer, y, x
da = imod.idf.open('path/to/results/head_*.idf')

Introduction

The imod Python package is an addition to iMOD and iMODFLOW, intended to facilitate working with groundwater models from Python. It does this by supporting reading and writing of the different iMOD file formats to existing objects often used in Python data processing.

IDF - iMOD Data Format

IDF is the binary raster format of iMOD. One file contains a X and Y 2 dimensional grid. Using a set of file name conventions more dimensions such as time and layer are added, for example: head_20181113_l3.idf for layer 3 and timestamp 2018-11-13. This package maps IDF files to and from the N dimensional labeled arrays of xarray.DataArray, using imod.idf.open and imod.idf.save, or, to read multiple parameters at the same time, imod.idf.open_dataset.

For more information on how to work with xarray.DataArray objects, we refer to the xarray documentation. Note that converting GIS raster formats to IDF is supported through xarray.open_rasterio, followed by imod.idf.save.

IPF - iMOD Point File

IPF files are text files used for storing tabular point data such as timeseries and borehole measurements. In the imod Python package these files are read in as pandas.DataFrame. Pandas is a popular package that makes analysis and processing of tabular data easy, and provides many input and output options, which in turn enables us to convert for instance existing CSV or Excel files to IPF files. The primary functions for reading and writing IPF files are imod.ipf.read and imod.ipf.save.

Authors

This Python package was written primarily by Martijn Visser and Huite Bootsma at Deltares.

Project details


Download files

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

Source Distribution

imod-0.9.0.tar.gz (226.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imod-0.9.0-py3-none-any.whl (197.5 kB view details)

Uploaded Python 3

File details

Details for the file imod-0.9.0.tar.gz.

File metadata

  • Download URL: imod-0.9.0.tar.gz
  • Upload date:
  • Size: 226.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200102 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3

File hashes

Hashes for imod-0.9.0.tar.gz
Algorithm Hash digest
SHA256 c2b904f7998ac2c778715d1e98a001391398ef5872df3a7633b42a89c4b34a35
MD5 d5f41eaa52c7bed074e62852cb63a95e
BLAKE2b-256 f2d0e5d63672802905506930c45bedb656d9ea045306836d156c2190284535fe

See more details on using hashes here.

File details

Details for the file imod-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: imod-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 197.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200102 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3

File hashes

Hashes for imod-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1cd58476808d6d8f4e50c4c28ce4d7eb80110444132d6b315f1a5eefa74376db
MD5 a6757a21c5161d1e8fb1ce957e8ca2bc
BLAKE2b-256 696cc6ccb7cc3f9a5a50de2c2b55ac374eb6bec62c93e82ff31812fd3cb88ded

See more details on using hashes here.

Supported by

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