Skip to main content

Pastas: Analysis of Groundwater Time Series

image image image image image

image image image image

Pastas: what is it?

Pastas is an open source python package for processing, simulating and analyzing groundwater time series. The object oriented structure allows for the quick implementation of new model components. Time series models can be created, calibrated, and analysed with just a few lines of python code with the built-in optimization, visualisation, and statistical analysis tools.

Documentation & Examples

Quick Example

# Import Python packages
import pandas as pd
import pastas as ps

# Load head and meteorological observations into a pandas Series
obs = pd.read_csv("head.csv", index_col="datetime", parse_dates=["datetime"]).squeeze()
prec = pd.read_csv("prec.csv", index_col="datetime", parse_dates=["datetime"]).squeeze()
evap = pd.read_csv("evap.csv", index_col="datetime", parse_dates=["datetime"]).squeeze()

# Create and calibrate Pastas model
ml = ps.Model(obs, name="head")
sm = ps.RechargeModel(ml, prec, evap, rfunc=ps.Exponential(), name="recharge")
ml.solve()

# Visualize the model results
ml.plots.results()

image

Get in Touch

  • Questions on Pastas can be asked and answered on Github Discussions.
  • Bugs, feature requests and other improvements can be posted as Github Issues.
  • Pull requests will only be accepted on the development branch (dev) of this repository. Please take a look at the developers section on the documentation website for more information on how to contribute to Pastas.

Quick installation guide

To install Pastas, a working version of Python has to be installed on your computer. We recommend using uv to manage Python and your project dependencies. However, you are free to use any Python installation method you prefer. The Anaconda Distribution is another popular option.

Stable version

To get the latest stable version, use:

pip install pastas

Or with uv:

uv pip install pastas

Update

To update pastas, use:

pip install pastas --upgrade

Developers

To get the latest development version, use:

pip install git+https://github.com/pastas/pastas.git@dev#egg=pastas

Related packages

  • Pastastore is a Python package for managing multiple timeseries and pastas models
  • Metran is a Python package to perform multivariate timeseries analysis using a technique called dynamic factor modelling.
  • Hydropandas can be used to obtain Dutch timeseries (KNMI, Dinoloket, ..)
  • PyEt can be used to compute potential evaporation from meteorological variables.

Dependencies

Pastas depends on a number of Python packages, of which all of the necessary are automatically installed when using the pip install manager. To know which dependencies exist, check the pyproject.toml file.

To install the most important optional dependencies (solver with LmFit and caching via cachetools) at the same time with Pastas use:

pip install pastas[full]

or for the development version use:

pip install git+https://github.com/pastas/pastas.git@dev#egg=pastas[full]

Pastas Sustaining membership

Funding is required to maintain Pastas and keep the software up-to-date. For this purpose, we call upon our community to contribute to this effort through our sustaining membership program. We will collect the sustaining membership contributions through Open Collective. The funds raised through the sustaining membership program will be used to support the development and maintenance of Pastas, as well as to fund new features and improvements to the software. For more information and to contribute, go to https://opencollective.com/pastas.

Pastas newsletter

To stay up-to-date with all things Pastas, receive news, event announcements, and more right into your e-mail inbox, please sign up for our quaterly newsletter here: https://hydroconsult.ch/pastas-newsletter-subscription/

How to Cite Pastas?

If you use Pastas in one of your studies, please cite the Pastas article in Groundwater:

To cite a specific version of Pastas, you can use the DOI provided for each official release (>0.9.7) through Zenodo. Click on the link to get a specific version and DOI, depending on the Pastas version.

  • Collenteur, R., Bakker, M., Caljé, R. & Schaars, F. (XXXX). Pastas: open-source software for time series analysis in hydrology (Version X.X.X). Zenodo. http://doi.org/10.5281/zenodo.1465866

Metadata

Release files for pastas 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pastas 2.0.0
File Size Uploaded
pastas-2.0.0.tar.gz 253.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pastas 2.0.0
File Interpreter ABI Platform
pastas-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 470.0 kB

Release files / pastas-2.0.0.tar.gz

Download URL pastas-2.0.0.tar.gz
Size 253.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a71ae8ff98bdece13fbf71b24b1ed44d87010be6aa8c89d6d1a05209f8d49960
BLAKE2b-256 checksum
How to use checksums
d50e48b8e736d90df91481606d3ab0558edcbd2bd618f5c7add9fd88ca340277
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / pastas-2.0.0-py3-none-any.whl

Download URL pastas-2.0.0-py3-none-any.whl
Size 216.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3bd827427b3a7da14ca608039833c6027177fcbcfba289de1c0243362016660
BLAKE2b-256 checksum
How to use checksums
6e5c66990ad8872b170f39385c7d3e6acb10d87f7da5fe5b01da94e12cfe884f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.14.0

2 release files

1.13.1

2 release files

1.13.0

2 release files

1.12.0

2 release files

1.11.0

2 release files

1.10.1

2 release files

1.10.0

2 release files

1.9.0

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.23.0

2 release files

0.20.0

2 release files

0.17.1

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page