Home

Awesome

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

NameDescriptionPyPI CondaDocsCIPaper
CMFCatchment Modelling Framework, a hydrologic modelling toolbox. (Version: 2.0.0, Last Update: 🟢 24-01-19)PyPIDocsDOI
HydPyA framework for the development and application of hydrological models based on Python. (Version: 6.1.1, Last Update: 🟢 24-09-23)PyPIDocs🟢
NeuralHydrologyPython library to train neural networks with a strong focus on hydrological applications. (Version: 1.11.0, Last Update: 🟢 24-08-02)PyPIDocs🟢DOI
PyTOPKAPIPyTOPKAPI is a BSD licensed Python library implementing the TOPKAPI Hydrological model (Liu and Todini, 2002).PyPIDocsDOI
SMARTPyPython implementation of the rainfall-runoff model SMART (Version: 0.2.2, Last Update: 🔴 22-02-14)PyPIDocs
SUMMAA 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 CondaDocsDOI
SuperflexPySuperflexPy: A new open source framework for building conceptual hydrological models (Version: 1.3.2, Last Update: 🟢 23-11-25)PyPIDocsDOI
VICThe Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model. (Version: 0.0.1, Last Update: 🔴 16-06-18)PyPI CondaDocsDOI
wrfhydropywrfhydrpy is a Python API for the WRF-Hydro modelling system. (Version: 0.0.21, Last Update: 🟢 24-02-16)PyPIDocs
XanthosXanthos 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

NameDescriptionPyPI CondaDocsCIPaper
AnaflowA python-package containing analytical solutions for the groundwater flow equation (Version: 1.1.0, Last Update: 🔴 23-04-16)PyPI CondaDocs🟢
FloPyThe Python interface to MODFLOW. (Version: 3.8.2, Last Update: 🟢 24-10-03)PyPI CondaDocs🟢DOI
GeoArchPyStochastic geological modeling (Version: 1.0.10, Last Update: 🟢 24-11-03)PyPIDocsDOI
Gravi4GWA tool for conversion between Δg and groundwater storage changes.DOI
imod-pythonMake massive MODFLOW models. (Version: 0.17.2, Last Update: 🟢 24-09-17)PyPIDocs🟢
NLmodPython 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)PyPIDocs🟢
PastasAnalysis of hydrological time series using time series models. (Version: 1.7.0, Last Update: 🟢 24-09-06)PyPI CondaDocs🟢DOI
PyHELPA Python library for the assessment of spatially distributed groundwater recharge and hydrological components with HELP. (Version: 0.4.0, Last Update: 🔴 22-06-20)PyPIDocs
PyKassoSimulate stochastic karst conduit networks (Version: 0.1.3, Last Update: 🔴 23-04-17)PyPIDocsDOI
TimMLA Multi-Layer, Analytic Element Model. (Version: 6.5.0, Last Update: 🟢 24-09-27)PyPI CondaDocs🟢DOI
TTimA Multi-Layer, Transient, Analytic Element Model. (Version: 0.6.7, Last Update: 🟢 24-09-27)PyPI CondaDocs🟢DOI
WellApplicationSet of tools for groundwater level and water chemistry analysis. (Version: 0.5.6, Last Update: 🔴 18-05-30)PyPI Conda
WellTestPyA python-package for handling well based field campaigns. (Version: 1.2.0, Last Update: 🔴 23-04-18)PyPI CondaDocs🟢DOI

Meteorological tools

NameDescriptionPyPI CondaDocsCIPaper
EvaporationCalculation of evaporation and transpiration. (Version: 2.0.1, Last Update: 🟢 24-04-16)PyPIDocs
ImproverIMPROVER is a library of algorithms for meteorological post-processing and verification. (Version: 1.9.0, Last Update: 🔴 No date)CondaDocs🟢
MELODISTMELODIST 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
MetPyMetPy 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 CondaDocs🟢
MetSimMetSim is a meteorological simulator and forcing disaggregator for hydrologic modeling and climate applications. (Version: 2.4.4, Last Update: 🔴 23-11-06)PyPI CondaDocs
pyetA python-package for calculating reference and potential evaporation. (Version: 1.3.1, Last Update: 🟢 24-03-15)PyPI CondaDocs🟢DOI
pyfao56A 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 CondaDOI
PyStepspySTEPS 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 CondaDocs🟢DOI
SPEICalculate and visualize some popular drought indices such as the SPI, SPEI and SGI. (Version: 0.5.1, Last Update: 🟢 24-09-26)PyPI

Unsaturated Zone

NameDescriptionPyPI CondaDocsCIPaper
pedonPython package for (unsaturated) soil properties including pedotransfer functions. (Version: 0.0.6, Last Update: 🟢 24-01-22)PyPI
PhydrusPython implementation of the HYDRUS-1D unsaturated zone model (Version: 0.2.0, Last Update: 🔴 21-03-30)PyPIDocs
Pytesmopython Toolbox for the Evaluation of Soil Moisture Observations. (Version: 0.16.0, Last Update: 🔴 23-09-12)PyPIDocs
VS2DPYPython implementation of the VS2D unsaturated zone model. (Version: 0.3.0, Last Update: 🔴 22-12-07)PyPI

Evaluation

NameDescriptionPyPI CondaDocsCIPaper
HydroErrGoodness of Fit metrics for use in comparison studies, specifically in the field of hydrology. (Version: 1.24, Last Update: 🔴 19-04-23)PyPI CondaDocs
HydrostatsTools for use in comparison studies, specifically for use in the field of hydrology. (Version: 0.78, Last Update: 🔴 19-04-24)PyPI CondaDocsDOI
travalTools for applying automatic error detection schemes to timeseries (Version: 0.5.1, Last Update: 🟢 24-09-27)PyPIDocs
xskillscoreMetrics for verifying forecasts. (Version: 0.0.26, Last Update: 🟢 24-03-10)PyPI CondaDocs

Miscellaneous

NameDescriptionPyPI CondaDocsCIPaper
ESMPYEarth System Modeling Framework (ESMF) Python interface. (Version: 8.7.0, Last Update: 🔴 No date)Conda
eWaterCyclePlatform to do computational hydrology using many of the above mentioned models. (Version: 2.3.1, Last Update: 🟢 24-09-17)PyPIDocs🟢DOI
htimeseriesThis module provides the HTimeseries class, which is a layer on top of pandas, offering a little more functionality. (Version: 7.0.0, Last Update: 🟢 24-04-14)PyPI
HydroboxHydrological preprocessing and analysis toolbox build upon pandas and numpy. (Version: 0.2.0, Last Update: 🔴 21-05-20)PyPI
HydrofunctionsA suite of convenience functions for working with hydrology data in an interactive Python session. (Version: 0.2.4, Last Update: 🔴 23-06-14)PyPI CondaDocs
HydrointerpA Python package for interpolating hydrologic data. (Version: 1.2.13, Last Update: 🔴 22-05-11)PyPIDocs
IRISA 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 CondaDocs
iRONSiRONS (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)PyPIDocsDOI
LandlabThe 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 CondaDocs
MesasMultiresolution Estimation of StorAge Selection functions. (Version: 1.20240418, Last Update: 🔴 No date)CondaDocs
pydsstoolsPython library for simple HEC-DSS functions. (Version: 2.3.2, Last Update: 🟢 24-01-13)PyPI
PyHSPFPython extensions to the Hydrological Simulation Program in Fortran (HSPF). (Version: 0.2.4, Last Update: 🔴 17-08-10)PyPI
PyMTPyMT 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 CondaDocs
pyopenrivercamSurface velocity, object tracking, and river flow measurements (Version: 0.6.1, Last Update: 🟢 24-09-26)PyPI Conda
pywatershedA hydrologic model in Python (Version: 2.1, Last Update: 🔴 18-03-24)PyPI CondaDocs🟢
PYWRSpatial allocation tool. (Version: 1.27.1, Last Update: 🟢 24-10-20)PyPI Conda
river-routeHydrologic river routing of gridded runoff depths or catchment volumes on vector stream networks (Version: 1.0.2, Last Update: 🟢 24-09-24)PyPIDocs
ShyftShyft 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
SPHYSpatial Processes in HYdrology (SPHY) model. (Version: 2.2.1, Last Update: 🔴 19-05-26)PyPIDocs
WetlandWetland 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)PyPIDocs

Data Collection

NameDescriptionPyPI CondaDocsCIPaper
DataretrievalDataretrieval 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
EcohydrolibLibraries and command-line scripts for performing ecohydrology data preparation workflows. (Version: 1.29, Last Update: 🔴 15-07-02)PyPI
HKVFEWSPYConnection to the Delft FEWS servers. (Version: 1.0.2, Last Update: 🔴 23-02-21)PyPI
HydroPandasModule for loading time series data into custom DataFrames (Version: 0.12.5, Last Update: 🟢 24-10-09)PyPIDocs
OpenradarLibrary for processing a set of dutch, german and belgian precipitation radars into calibrated composites. (Version: 1.0.1, Last Update: 🔴 19-10-31)PyPI
PyHISPyHIS is a python library for querying CUAHSI*-HIS** web services. (Version: 0.1.1-alpha, Last Update: 🔴 11-11-15)PyPI
UlmoClean, simple and fast access to public hydrology and climatology data. (Version: 0.8.8, Last Update: 🔴 21-09-02)PyPI CondaDocs
WetterdienstPython Toolset For Accessing Weather Data From German Weather Service. (Version: 0.97.0, Last Update: 🟢 24-10-06)PyPI CondaDocs

Geospatial

NameDescriptionPyPI CondaDocsCIPaper
HPGLHigh Performance Geostatistics Library.
LidarTerrain and hydrological analysis based on LiDAR-derived digital elevation models (DEM). (Version: 0.8.3, Last Update: 🟢 24-06-06)PyPI CondaDocs
PcRasterIs a collection of software targeted at the development and deployment of spatio-temporal environmental models. (Version: 4.4.1, Last Update: 🔴 No date)Conda
PyGeoprocessingA 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 CondaDocs
PyshedsSimple and fast watershed delineation in python. (Version: 0.4, Last Update: 🟢 24-05-09)PyPI Conda

Optimization and Uncertainty

NameDescriptionPyPI CondaDocsCIPaper
PyemuPython modules for model-independent uncertainty analyses, data-worth analyses, and interfacing with PEST(++). (Version: 1.3.7, Last Update: 🟢 24-08-14)PyPI CondaDocs
SPOTpyA Statistical Parameter Optimization Tool for Python. (Version: 1.6.2, Last Update: 🔴 23-02-28)PyPI CondaDocs

Statistics

NameDescriptionPyPI CondaDocsCIPaper
Climate-indicesClimate indices for drought monitoring, community reference implementations in Python. (Version: 2.0.1, Last Update: 🟢 24-09-19)PyPIDocs
EFlowCalcCalculator of Streamflow Characteristics. (Version: 0.1.0, Last Update: 🔴 21-04-26)PyPI
HydroLMThe HydroLM package contains a class and functions for automating linear regressions OLS for hydrologists. (Version: 1.0.7, Last Update: 🔴 19-01-15)PyPI
PySDIPysdi 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.

NameDescriptionPyPI CondaDocsCIPaper
CatchmodCATCHMOD 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
DRYPDryland Water Partition model.
EXP-HYDROEXP-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.DocsDOI
HydroAnalysisPython package to calculate indices and metrics useful in the everyday job of a hydrologist. (Version: 1.0.0, Last Update: 🔴 21-11-20)PyPIDocs
HydropyAnalysis of hydrological oriented time series. (Version: 0.1.2, Last Update: 🔴 17-02-03)PyPI
LHMPLumped Hydrological Models Playground.
LuKarsThe LuKARS model is a lumped karst hydrological model to perform studies in karstic environments.
mhmpyA Python-API for the mesoscale Hydrological Model. (Version: 0.0.0, Last Update: 🔴 19-08-26)PyPI
PyEtoPyETo 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
PyGLUEGeneralised Likelihood Uncertainty Estimation (GLUE) Framework. (Version: 0.0.4, Last Update: 🔴 12-01-06)PyPI
PyStreamPython implementation of the STREAM hydrological rainfall-runoff model. (Version: 0.1, Last Update: 🔴 15-06-18)PyPI
RRMPGRainfall-Runoff modelling playground.Docs
wflowwflow 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 CondaDocs
xsboringenA 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.