Skip to main content

PEST utilities for MODFLOW

Project description

PyPestUtils

Suite of Python tools based on PEST utilities to support parameterization with pilot points, drawing stochastic realizations, and MODFLOW post-processing for structured and unstructured grids. This package consists of a (pre-)compiled shared fortran library, and a corresponding low-level python wrapper around the library functions. There are also higher-level "helper" functions to further abstract the granular low-level function calls for common workflow elements.

The low-level functions are relatively strict in their argument types - this is required to effectively pass the array-type data container references to the fortran library. As such, the low-level python functions perform considerable type checking. The higher-level helpers attempt to support a variety of argument types and will attempt coerce to the required type.

This package is currently in pre-alpha development, and is not suitable for use, but early adopters are welcome to have a go.

Examples

There are several jupyter notebook examples of using pypestutils for a structured and quadtree Freyberg model. These notebooks rely on both flopy and pyEMU to help with visualization and processing.

The use the low-level python interface to the shared fortran library, you create a PESTUTILSLIB instance and then can directly call the shared library routines:

from pypestutils.pestutilslib import PestUtilsLib
lib = PestUtilsLib() #the constructor searches for the shared lib
grid_info = lib.install_mf6_grid_from_file("grid","freyberg6.disv.grb")
easting,northing,elev = lib.get_cell_centres_mf6("grid",grid_info["ncells"])

The higher-level helper functions obsecure the calls the fortran library and string together multiple low-level function calls:

import pypestutils.helpers as helpers
grid_info = helpers.get_grid_info_from_file("freyberg6.disv.grb")

Documentation

The documentation for pypestutils can be found here

The documentation for the shared FORTRAN library can be found here

Installation

Dependencies

pypestutils requires numpy and pandas

Easy way

Use pip to install a built distribution for Windows, Linux or macOS:

pip install pypestutils

to also include optional requirements use:

pip install pypestutils[optional]

From source

Installation from source requires a Fortran compiler and build tools. See BUILD.md for details.

Disclaimer

This software is preliminary or provisional and is subject to revision. It is being provided to meet the need for timely best science. This software is provided "as is" and "as-available", and makes no representations or warranties of any kind concerning the software, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable.

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

pypestutils-0.2.1.tar.gz (217.3 kB view hashes)

Uploaded Source

Built Distributions

pypestutils-0.2.1-py3-none-win_amd64.whl (823.3 kB view hashes)

Uploaded Python 3 Windows x86-64

pypestutils-0.2.1-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.5 MB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

pypestutils-0.2.1-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (909.8 kB view hashes)

Uploaded Python 3 manylinux: glibc 2.17+ ARM64

pypestutils-0.2.1-py3-none-macosx_10_9_x86_64.whl (1.6 MB view hashes)

Uploaded Python 3 macOS 10.9+ x86-64

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