nlmod is an open-source Python package for building Modflow 6 groundwater models from online data sources in The Netherlands
Project description
nlmod
Python package with functions to process, build and visualise MODFLOW models in the Netherlands.
The functions in nlmod have four main objectives:
- Create and adapt the temporal and spatial discretization of a MODFLOW model using an xarray Dataset (
nlmod.dims
). - Download and read data from external sources, project this data on the modelgrid and add this data to an xarray Dataset (
nlmod.read
). - Use data in an xarray Dataset to build modflow packages using FloPy (
nlmod.gwf
for Modflow 6 andnlmod.modpath
for Modpath). - Visualise modeldata in Python (
nlmod.plot
) or GIS software (nlmod.gis
).
More information can be found on the documentation-website: https://nlmod.readthedocs.io/.
Installation
Install the module with pip:
pip install nlmod
nlmod
has many required dependencies: flopy
, xarray
, netcdf4
, rasterio
, rioxarray
, affine
, geopandas
, owslib
, hydropandas
, shapely
, pyshp
, rtree
, matplotlib
, dask
and colorama
. On top of that there are some optional dependecies, only needed (and imported) in a single method. Examples of this are bottleneck
(used in calculate_gxg), geocube
(used in add_min_ahn_to_gdf), h5netcdf
(used for hdf5 files backend in xarray). To install the nlmod with the optional dependencies use:
pip install nlmod[full]
When using pip the dependencies are automatically installed. Some dependencies are notoriously hard to install on certain platforms.
Please see the dependencies section of the hydropandas
package for more information on how to install these packages manually.
Getting started
If you are using nlmod for the first time you need to download the MODFLOW executables. You can easily download these executables by running this Python code:
import nlmod
nlmod.download_mfbinaries()
After you've downloaded the executables you can run the Jupyter Notebooks in the examples folder. These notebooks illustrate how you to use the nlmod package.
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.