raoulcollenteur / Python-Hydrology-Tools

:droplet: This repository holds a list of open source Python packages interesting to Hydrologists
436 stars 99 forks source link
hydrologists hydrology open-source python

Open Source Python Packages in Hydrology

My attempt to list interesting open source python projects that can be used in the field of Hydrology. In a 2024 update, I automated various tasks to maintain the quality of this list, and added more information about the packages that can serve as quality indicators. The description now lists when the last update on Pypi/Conda was, to highlight whether a package is probably active (šŸŸ¢) or inactive (šŸ”“). Also information about the FAIR repository, description paper, and Continuous Integration testing (CI) is included. All this in the hope that more and more packages develop according to common research software developement best practices. Suggestions as issues or pull requests are welcome!

Raoul A. Collenteur, Eawag.

Categories

Catchment Hydrology

Name Description PyPI Conda Docs CI Paper
CMF Catchment Modelling Framework, a hydrologic modelling toolbox. (Version: 2.0.0, Last Update: šŸŸ¢ 24-01-19) PyPI Docs DOI
HydPy A framework for the development and application of hydrological models based on Python. (Version: 6.1.1, Last Update: šŸŸ¢ 24-09-23) PyPI Docs šŸŸ¢
NeuralHydrology Python library to train neural networks with a strong focus on hydrological applications. (Version: 1.11.0, Last Update: šŸŸ¢ 24-08-02) PyPI Docs šŸŸ¢ DOI
PyTOPKAPI PyTOPKAPI is a BSD licensed Python library implementing the TOPKAPI Hydrological model (Liu and Todini, 2002). PyPI Docs DOI
SMARTPy Python implementation of the rainfall-runoff model SMART (Version: 0.2.2, Last Update: šŸ”“ 22-02-14) PyPI Docs
SUMMA A hydrologic modeling framework that can be used for the systematic analysis of alternative model conceptualizations with respect to flux parameterizations, spatial configurations, and numerical solution techniques. (Version: 1.2.0, Last Update: šŸ”“ 19-01-16) PyPI Conda Docs DOI
SuperflexPy SuperflexPy: A new open source framework for building conceptual hydrological models (Version: 1.3.2, Last Update: šŸŸ¢ 23-11-25) PyPI Docs DOI
VIC The Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model. (Version: 0.0.1, Last Update: šŸ”“ 16-06-18) PyPI Conda Docs DOI
wrfhydropy wrfhydrpy is a Python API for the WRF-Hydro modelling system. (Version: 0.0.21, Last Update: šŸŸ¢ 24-02-16) PyPI Docs
Xanthos Xanthos is an open-source hydrologic model, written in Python, designed to quantify and analyze global water availability. (Version: 2.4.1, Last Update: šŸ”“ 21-08-10) PyPI

Groundwater

Name Description PyPI Conda Docs CI Paper
Anaflow A python-package containing analytical solutions for the groundwater flow equation (Version: 1.1.0, Last Update: šŸ”“ 23-04-16) PyPI Conda Docs šŸŸ¢
FloPy The Python interface to MODFLOW. (Version: 3.8.2, Last Update: šŸŸ¢ 24-10-03) PyPI Conda Docs šŸŸ¢ DOI
GeoArchPy Stochastic geological modeling (Version: 1.0.10, Last Update: šŸŸ¢ 24-11-03) PyPI Docs DOI
Gravi4GW A tool for conversion between Ī”g and groundwater storage changes. DOI
imod-python Make massive MODFLOW models. (Version: 0.18.1, Last Update: šŸŸ¢ 24-11-20) PyPI Docs šŸŸ¢
NLmod Python code to process, build and visualize MODFLOW models in the Netherlands. Model data is stored in a xarray Datasets and geopandas GeoDataFrames. (Version: 0.8.1, Last Update: šŸŸ¢ 24-07-25) PyPI Docs šŸŸ¢
Pastas Analysis of hydrological time series using time series models. (Version: 1.7.0, Last Update: šŸŸ¢ 24-09-06) PyPI Conda Docs šŸŸ¢ DOI
PyHELP A Python library for the assessment of spatially distributed groundwater recharge and hydrological components with HELP. (Version: 0.4.0, Last Update: šŸ”“ 22-06-20) PyPI Docs
PyKasso Simulate stochastic karst conduit networks (Version: 0.1.3, Last Update: šŸ”“ 23-04-17) PyPI Docs DOI
TimML A Multi-Layer, Analytic Element Model. (Version: 6.5.0, Last Update: šŸŸ¢ 24-09-27) PyPI Conda Docs šŸŸ¢ DOI
TTim A Multi-Layer, Transient, Analytic Element Model. (Version: 0.6.7, Last Update: šŸŸ¢ 24-09-27) PyPI Conda Docs šŸŸ¢ DOI
WellApplication Set of tools for groundwater level and water chemistry analysis. (Version: 0.5.6, Last Update: šŸ”“ 18-05-30) PyPI Conda
WellTestPy A python-package for handling well based field campaigns. (Version: 1.2.0, Last Update: šŸ”“ 23-04-18) PyPI Conda Docs šŸŸ¢ DOI

Meteorological tools

Name Description PyPI Conda Docs CI Paper
Evaporation Calculation of evaporation and transpiration. (Version: 2.0.1, Last Update: šŸŸ¢ 24-04-16) PyPI Docs
Improver IMPROVER is a library of algorithms for meteorological post-processing and verification. (Version: 1.9.0, Last Update: šŸ”“ No date) Conda Docs šŸŸ¢
MELODIST MELODIST is an open-source toolbox written in Python for disaggregating daily meteorological time series to hourly time steps. (Version: 0.1.6, Last Update: šŸŸ¢ 24-06-07) PyPI šŸŸ¢ DOI
MetPy MetPy is a collection of tools in Python for reading, visualizing and performing calculations with weather data. (Version: 1.6.3, Last Update: šŸŸ¢ 24-08-26) PyPI Conda Docs šŸŸ¢
MetSim MetSim is a meteorological simulator and forcing disaggregator for hydrologic modeling and climate applications. (Version: 2.4.4, Last Update: šŸ”“ 23-11-06) PyPI Conda Docs
pyet A python-package for calculating reference and potential evaporation. (Version: 1.3.1, Last Update: šŸŸ¢ 24-03-15) PyPI Conda Docs šŸŸ¢ DOI
pyfao56 A Python implementation of the FAO-56 dual crop coefficient approach for crop water use estimation and irrigation scheduling. (Version: 1.3.0, Last Update: šŸŸ¢ 24-03-21) PyPI Conda DOI
PySteps pySTEPS is a community-driven initiative for developing and maintaining an easy to use, modular, free and open source Python framework for short-term ensemble prediction systems. (Version: 1.12.0, Last Update: šŸŸ¢ 24-10-07) PyPI Conda Docs šŸŸ¢ DOI
SPEI Calculate and visualize some popular drought indices such as the SPI, SPEI and SGI. (Version: 0.6.0, Last Update: šŸŸ¢ 24-11-11) PyPI

Unsaturated Zone

Name Description PyPI Conda Docs CI Paper
pedon Python package for (unsaturated) soil properties including pedotransfer functions. (Version: 0.0.6, Last Update: šŸŸ¢ 24-01-22) PyPI
Phydrus Python implementation of the HYDRUS-1D unsaturated zone model (Version: 0.2.0, Last Update: šŸ”“ 21-03-30) PyPI Docs
Pytesmo python Toolbox for the Evaluation of Soil Moisture Observations. (Version: 0.17.0, Last Update: šŸŸ¢ 24-11-14) PyPI Docs
VS2DPY Python implementation of the VS2D unsaturated zone model. (Version: 0.3.0, Last Update: šŸ”“ 22-12-07) PyPI

Evaluation

Name Description PyPI Conda Docs CI Paper
HydroErr Goodness of Fit metrics for use in comparison studies, specifically in the field of hydrology. (Version: 1.24, Last Update: šŸ”“ 19-04-23) PyPI Conda Docs
Hydrostats Tools for use in comparison studies, specifically for use in the field of hydrology. (Version: 0.78, Last Update: šŸ”“ 19-04-24) PyPI Conda Docs DOI
traval Tools for applying automatic error detection schemes to timeseries (Version: 0.5.1, Last Update: šŸŸ¢ 24-09-27) PyPI Docs
xskillscore Metrics for verifying forecasts. (Version: 0.0.26, Last Update: šŸŸ¢ 24-03-10) PyPI Conda Docs

Miscellaneous

Name Description PyPI Conda Docs CI Paper
[]()
ESMPY Earth System Modeling Framework (ESMF) Python interface. (Version: 8.7.0, Last Update: šŸ”“ No date) Conda
eWaterCycle Platform to do computational hydrology using many of the above mentioned models. (Version: 2.3.1, Last Update: šŸŸ¢ 24-09-17) PyPI Docs šŸŸ¢ DOI
htimeseries This module provides the HTimeseries class, which is a layer on top of pandas, offering a little more functionality. (Version: 8.0.0, Last Update: šŸŸ¢ 24-11-23) PyPI
Hydrobox Hydrological preprocessing and analysis toolbox build upon pandas and numpy. (Version: 0.2.0, Last Update: šŸ”“ 21-05-20) PyPI
Hydrofunctions A suite of convenience functions for working with hydrology data in an interactive Python session. (Version: 0.2.4, Last Update: šŸ”“ 23-06-14) PyPI Conda Docs
Hydrointerp A Python package for interpolating hydrologic data. (Version: 1.2.13, Last Update: šŸ”“ 22-05-11) PyPI Docs
IRIS A powerful, format-agnostic, and community-driven Python library for analysing and visualising Earth science data. (Version: 1.0.7, Last Update: šŸ”“ 20-02-07) PyPI Conda Docs
iRONS iRONS (interactive Reservoir Operation Notebooks and Software) is a python package that enables the simulation, forecasting and optimisation of reservoir systems. (Version: 1.0, Last Update: šŸ”“ 22-11-12) PyPI Docs DOI
Landlab The Landlab project creates an environment in which scientists can build a numerical landscape model without having to code all of the individual components. (Version: 2.9.2, Last Update: šŸŸ¢ 24-10-18) PyPI Conda Docs
Mesas Multiresolution Estimation of StorAge Selection functions. (Version: 1.20240418, Last Update: šŸ”“ No date) Conda Docs
pydsstools Python library for simple HEC-DSS functions. (Version: 2.3.2, Last Update: šŸŸ¢ 24-01-13) PyPI
PyHSPF Python extensions to the Hydrological Simulation Program in Fortran (HSPF). (Version: 0.2.4, Last Update: šŸ”“ 17-08-10) PyPI
PyMT PyMT is an Open Source Python package that provides the necessary tools used for the coupling of models that expose the Basic Model Interface (BMI). (Version: 0.5.1, Last Update: šŸ”“ 10-09-06) PyPI Conda Docs
pyopenrivercam Surface velocity, object tracking, and river flow measurements (Version: 0.6.1, Last Update: šŸŸ¢ 24-09-26) PyPI Conda
pywatershed A hydrologic model in Python (Version: 2.1, Last Update: šŸ”“ 18-03-24) PyPI Conda Docs šŸŸ¢
PYWR Spatial allocation tool. (Version: 1.27.1, Last Update: šŸŸ¢ 24-10-20) PyPI Conda
river-route Hydrologic river routing of gridded runoff depths or catchment volumes on vector stream networks (Version: 1.0.2, Last Update: šŸŸ¢ 24-09-24) PyPI Docs
Shyft Shyft is the open-source toolbox for the energy-market domain, funded and supported by Statkraft. (Version: 20.0.0.post1, Last Update: šŸŸ¢ 24-10-11) PyPI
SPHY Spatial Processes in HYdrology (SPHY) model. (Version: 2.2.1, Last Update: šŸ”“ 19-05-26) PyPI Docs
Wetland Wetland is a toolset for mapping surface water and wetland hydrological dynamics using fine-resolution aerial imagery within Google Earth Engine (GEE). (Version: 0.1.0, Last Update: šŸ”“ 18-10-19) PyPI Docs

Data Collection

Name Description PyPI Conda Docs CI Paper
Dataretrieval Dataretrieval is a Python package for obtaining USGS or EPA water quality data, streamflow data, and metadata directly from web services. (Version: 1.0.11, Last Update: šŸŸ¢ 24-10-25) PyPI Conda
Ecohydrolib Libraries and command-line scripts for performing ecohydrology data preparation workflows. (Version: 1.29, Last Update: šŸ”“ 15-07-02) PyPI
HKVFEWSPY Connection to the Delft FEWS servers. (Version: 1.0.2, Last Update: šŸ”“ 23-02-21) PyPI
HydroPandas Module for loading time series data into custom DataFrames (Version: 0.12.5, Last Update: šŸŸ¢ 24-10-09) PyPI Docs
Openradar Library for processing a set of dutch, german and belgian precipitation radars into calibrated composites. (Version: 1.0.1, Last Update: šŸ”“ 19-10-31) PyPI
PyHIS PyHIS is a python library for querying CUAHSI*-HIS** web services. (Version: 0.1.1-alpha, Last Update: šŸ”“ 11-11-15) PyPI
Ulmo Clean, simple and fast access to public hydrology and climatology data. (Version: 0.8.8, Last Update: šŸ”“ 21-09-02) PyPI Conda Docs
Wetterdienst Python Toolset For Accessing Weather Data From German Weather Service. (Version: 0.97.0, Last Update: šŸŸ¢ 24-10-06) PyPI Conda Docs

Geospatial

Name Description PyPI Conda Docs CI Paper
HPGL High Performance Geostatistics Library.
Lidar Terrain and hydrological analysis based on LiDAR-derived digital elevation models (DEM). (Version: 0.8.3, Last Update: šŸŸ¢ 24-06-06) PyPI Conda Docs
PcRaster Is a collection of software targeted at the development and deployment of spatio-temporal environmental models. (Version: 4.4.1, Last Update: šŸ”“ No date) Conda
PyGeoprocessing A Python/Cython based library that provides a set of commonly used raster, vector, and hydrological operations for GIS processing. (Version: 2.4.6, Last Update: šŸŸ¢ 24-10-15) PyPI Conda Docs
Pysheds Simple and fast watershed delineation in python. (Version: 0.4, Last Update: šŸŸ¢ 24-05-09) PyPI Conda

Optimization and Uncertainty

Name Description PyPI Conda Docs CI Paper
Pyemu Python modules for model-independent uncertainty analyses, data-worth analyses, and interfacing with PEST(++). (Version: 1.3.7, Last Update: šŸŸ¢ 24-08-14) PyPI Conda Docs
SPOTpy A Statistical Parameter Optimization Tool for Python. (Version: 1.6.2, Last Update: šŸ”“ 23-02-28) PyPI Conda Docs

Statistics

Name Description PyPI Conda Docs CI Paper
Climate-indices Climate indices for drought monitoring, community reference implementations in Python. (Version: 2.0.1, Last Update: šŸŸ¢ 24-09-19) PyPI Docs
EFlowCalc Calculator of Streamflow Characteristics. (Version: 0.1.0, Last Update: šŸ”“ 21-04-26) PyPI
HydroLM The HydroLM package contains a class and functions for automating linear regressions OLS for hydrologists. (Version: 1.0.7, Last Update: šŸ”“ 19-01-15) PyPI
PySDI Pysdi is a set of open source scripts that compute non-parametric standardized drought indices (SDI) using raster data sets as input data. (Version: 0.2.6.3.1, Last Update: šŸ”“ 20-02-25) PyPI

Legacy Packages

These packages are not maintained anymore, or might not meet a minimum set of requirements, but might still be useful for some users. Name Description PyPI Conda Docs CI Paper
Catchmod CATCHMOD is widely used rainfall runoff model in the United Kingdom. It was introduced by Wilby (1994). (Version: 1.1.0, Last Update: šŸ”“ 19-01-08) PyPI
DRYP Dryland Water Partition model.
EXP-HYDRO EXP-HYDRO is a catchment scale hydrological model that operates at a daily time-step. It takes as inputs the daily values of precipitation, air temperature, and potential evapotranspiration, and simulates daily streamflow at the catchment outlet. Docs DOI
HydroAnalysis Python package to calculate indices and metrics useful in the everyday job of a hydrologist. (Version: 1.0.0, Last Update: šŸ”“ 21-11-20) PyPI Docs
Hydropy Analysis of hydrological oriented time series. (Version: 0.1.2, Last Update: šŸ”“ 17-02-03) PyPI
LHMP Lumped Hydrological Models Playground.
LuKars The LuKARS model is a lumped karst hydrological model to perform studies in karstic environments.
mhmpy A Python-API for the mesoscale Hydrological Model. (Version: 0.0.0, Last Update: šŸ”“ 19-08-26) PyPI
PyEto PyETo is a Python library for calculating reference crop evapotranspiration (ETo), sometimes referred to as potential evapotranspiration (PET). The library provides numerous functions for estimating missing meteorological data. Docs
PyGLUE Generalised Likelihood Uncertainty Estimation (GLUE) Framework. (Version: 0.0.4, Last Update: šŸ”“ 12-01-06) PyPI
PyStream Python implementation of the STREAM hydrological rainfall-runoff model. (Version: 0.1, Last Update: šŸ”“ 15-06-18) PyPI
RRMPG Rainfall-Runoff modelling playground. Docs
wflow wflow consists of a set of Python programs that can be run on the command line and perform hydrological simulations. The models are based on the PCRaster Python framework (Version: 2020.1.2, Last Update: šŸ”“ 20-11-26) PyPI Conda Docs
xsboringen A python library for processing and plotting borehole and CPT data, developed for open data formats in the Netherlands.

Background Info

UPDATE: The Pypa package authority has now added "Hydrology" as a classifier so we can start collecting python packages used by the hydrological community! If you are maintaining a python package, please add Topic :: Scientific/Engineering :: Hydrology to your setup.py so people can find your package.