Skip to content

Commit

Permalink
Merge pull request #273 from ArtesiaWater/dev
Browse files Browse the repository at this point in the history
Update to version 0.7.0
  • Loading branch information
rubencalje authored Oct 24, 2023
2 parents 6f3ea00 + 46d7585 commit bf21f20
Show file tree
Hide file tree
Showing 103 changed files with 6,297 additions and 1,520 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ jobs:
run: |
py.test ./tests -m "not notebooks"
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@master
with:
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,13 @@ nlmod/bin/*
!nlmod/bin/
!nlmod/bin/mp7_2_002_provisional
flowchartnlmod.pptx
tests/data/

tests/data/*
!tests/data/**/
tests/data/mfoutput/*
!tests/data/mfoutput/vertex/*
!tests/data/mfoutput/structured/*

docs/examples/*/
!docs/examples/data/
!docs/examples/data/chloride_hbossche.nc
6 changes: 6 additions & 0 deletions .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@ pylint:
- no-else-raise
- too-many-arguments
- too-many-locals
- too-many-branches
- too-many-statements
- logging-fstring-interpolation

mccabe:
disable:
- MC0001
5 changes: 2 additions & 3 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand All @@ -20,7 +20,6 @@ sphinx:

# Optionally declare the Python requirements required to build your docs
python:
system_packages: true
install:
- method: pip
path: .
Expand Down
50 changes: 41 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,67 @@
[![PyPI version](https://badge.fury.io/py/nlmod.svg)](https://badge.fury.io/py/nlmod)
[![Documentation Status](https://readthedocs.org/projects/nlmod/badge/?version=stable)](https://nlmod.readthedocs.io/en/stable/?badge=stable)

Python package with functions to process, build and visualise MODFLOW models in the Netherlands.
Python package to build, run and visualize MODFLOW 6 groundwater models in the Netherlands.

The functions in nlmod have four main objectives:
`nlmod` was built to allow users to write scripts to quickly download relevant data
from publicly available sources, and build and post-process groundwater flow and
transport models at different spatial and temporal scales to answer specific
geohydrological questions. Scripting these steps, from downloading data to building
groundwater models, makes models more reproducible and transparent.

The functions in `nlmod` have four main objectives:

1. Create and adapt the temporal and spatial discretization of a MODFLOW model using an xarray Dataset (`nlmod.dims`).
2. Download and read data from external sources, project this data on the modelgrid and add this data to an xarray Dataset (`nlmod.read`).
3. Use data in an xarray Dataset to build modflow packages using FloPy (`nlmod.gwf` for Modflow 6 and `nlmod.modpath` for Modpath).
3. Use data in an xarray Dataset to build modflow packages for both groundwater flow and transport models using FloPy (`nlmod.sim`, `nlmod.gwf` and `nlmod.gwt` for Modflow 6 and `nlmod.modpath` for Modpath).
4. Visualise modeldata in Python (`nlmod.plot`) or GIS software (`nlmod.gis`).

More information can be found on the documentation-website: https://nlmod.readthedocs.io/.
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:
`nlmod` has the following required dependencies:

* `flopy`
* `xarray`
* `netcdf4`
* `rasterio`
* `rioxarray`
* `affine`
* `geopandas`
* `owslib`
* `hydropandas`
* `shapely`
* `pyshp`
* `rtree`
* `matplotlib`
* `dask`
* `colorama`

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), `scikit-image`
(used in calculate_sea_coverage). To install `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](https://github.com/ArtesiaWater/hydropandas#dependencies) section of the `hydropandas` package for more information on how to install these packages manually.
When using pip the dependencies are automatically installed. Some dependencies are
notoriously hard to install on certain platforms. Please see the
[dependencies](https://github.com/ArtesiaWater/hydropandas#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:
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.
After you've downloaded the executables you can run the Jupyter Notebooks in the
examples folder. These notebooks illustrate how to use the `nlmod` package.
1 change: 1 addition & 0 deletions docs/_static/logo_brabant_water.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/logo_evides.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bf21f20

Please sign in to comment.