Hydrology models

Rivers, aquifers and all that

Refugees from Brazil’s Grande Seca drought of 1878

TBD: Ground water hydrology, surface water hydrology, coastal water hydrology… UCSB Climate hazards data.



AFAICT the go-to applied reference here is Anderson, Woessner, and Hunt (2015).


MODFLOW is the USGS’s modular hydrologic model. MODFLOW is considered an international standard for simulating and predicting groundwater conditions and groundwater/surface-water interactions. MODFLOW 6 is presently the core MODFLOW version distributed by the USGS. The previous core version, MODFLOW-2005, is actively maintained and supported as well.


The FloPy package consists of a set of Python scripts to run MODFLOW, MT3D, SEAWAT and other MODFLOW-related groundwater programs. FloPy enables you to run all these programs with Python scripts.

But how do you install MODFLOW? It’s one of those US government software packages which is perfectly respectable and functional but some versions use a “classic”, which is to say, antiquated, mode of development. (I mean, it does date to 1988.)

For the version of a… distinguished vintage, there is no source code repository (not for us punters anyway), just giant (like, 400MB) zip files full of compiled Windows binaries with big chunks of fortran code alongside for compilation by the adventurous. There are various versions which are incompatible with each other to some unexplained extent. These have version numbers like NWT, 2005 and 6.

Thankfully the community have made modflow pymake. The documentation was a little confusing (it suggests you use certain scripts that are not installed per default), but they all turn out to be one-liners. Here is how to install MODFLOW-NWT:

pip install pymake


import pymake

This gets you a version that runs on linux, I think, but does not work on macos.

On macos, the easiest way seems to be to use docker files.

Here are some miscellaneous ones I am auditioning: lucasaugustomcc/modflow-nwt, flopymetascript, mintproject/modflow-2005 (the most popular one).

Or you can install MODFLOW 6 (but I think only that version) via conda:

conda install -c conda-forge modflow6

MODFLOW 6 has a source code repository and everything, compiles and runs everywhere etc, but it does not implement all the features of historical MODFLOW version

Geostats Framework

GeoStat Framework:

This Framework was created within the PhD project of Sebastian Müller at the Computational Hydrosystems Department at the UFZ Leipzig.

AnaFlow Quickstart

AnaFlow provides several analytical and semi-analytical solutions for the groundwater-flow equation.

WellTestPy is a python-package for handling well based field campaigns. You can easily estimate parameters of aquifer-heterogeneity from pumping test data.


Try Pangeo Hydrology Dataset Catalog, which lists some hydrology-focussed spatial data.


Anderson, Mary P., William W. Woessner, and R. J. Hunt. 2015. Applied Groundwater Modeling: Simulation of Flow and Advective Transport. Second edition. London ; San Diego, CA: Academic Press. https://doi.org/10.1016/C2009-0-21563-7.
Bakker, M., V. Post, C. D. Langevin, J. D. Hughes, J. T. White, J. J. Starn, and M. N. Fienen. 2016. “Scripting MODFLOW Model Development Using Python and FloPy.” Groundwater 54 (5): 733–39. https://doi.org/10.1111/gwat.12413.
Cai, Yuzhi, and Dominic E. Reeve. 2013. “Extreme Value Prediction via a Quantile Function Model.” Coastal Engineering 77 (July): 91–98. https://doi.org/10.1016/j.coastaleng.2013.02.003.
Cranmer, Miles, Sam Greydanus, Stephan Hoyer, Peter Battaglia, David Spergel, and Shirley Ho. 2020. “Lagrangian Neural Networks.” July 30, 2020. http://arxiv.org/abs/2003.04630.
Cui, Tao, Luk Peeters, Dan Pagendam, Trevor Pickett, Huidong Jin, Russell S. Crosbie, Matthias Raiber, David W. Rassam, and Mat Gilfedder. 2018. “Emulator-Enabled Approximate Bayesian Computation (ABC) and Uncertainty Analysis for Computationally Expensive Groundwater Models.” Journal of Hydrology 564 (September): 191–207. https://doi.org/10.1016/j.jhydrol.2018.07.005.
Gladish, Daniel W., Daniel E. Pagendam, Luk J. M. Peeters, Petra M. Kuhnert, and Jai Vaze. 2018. “Emulation Engines: Choice and Quantification of Uncertainty for Complex Hydrological Models.” Journal of Agricultural, Biological and Environmental Statistics 23 (1): 39–62. https://doi.org/10.1007/s13253-017-0308-3.
He, QiZhi, David Barajas-Solano, Guzel Tartakovsky, and Alexandre M. Tartakovsky. 2020. “Physics-Informed Neural Networks for Multiphysics Data Assimilation with Application to Subsurface Transport.” Advances in Water Resources 141 (July): 103610. https://doi.org/10.1016/j.advwatres.2020.103610.
Kimura, Nobuaki, Ikuo Yoshinaga, Kenji Sekijima, Issaku Azechi, and Daichi Baba. 2020. “Convolutional Neural Network Coupled with a Transfer-Learning Approach for Time-Series Flood Predictions.” Water 12 (1, 1): 96. https://doi.org/10.3390/w12010096.
Lee, Herbert K. H., Dave M. Higdon, Zhuoxin Bi, Marco A. R. Ferreira, and Mike West. 2002. “Markov Random Field Models for High-Dimensional Parameters in Simulations of Fluid Flow in Porous Media.” Technometrics 44 (3): 230–41. https://doi.org/10.1198/004017002188618419.
Lutter, Michael, Christian Ritter, and Jan Peters. 2019. “Deep Lagrangian Networks: Using Physics as Model Prior for Deep Learning.” July 9, 2019. http://arxiv.org/abs/1907.04490.
Qian, Elizabeth, Boris Kramer, Benjamin Peherstorfer, and Karen Willcox. 2020. “Lift & Learn: Physics-Informed Machine Learning for Large-Scale Nonlinear Dynamical Systems.” Physica D: Nonlinear Phenomena 406 (May): 132401. https://doi.org/10.1016/j.physd.2020.132401.
Raissi, Maziar, Alireza Yazdani, and George Em Karniadakis. 2020. “Hidden Fluid Mechanics: Learning Velocity and Pressure Fields from Flow Visualizations.” Science 367 (6481): 1026–30. https://doi.org/10.1126/science.aaw4741.
Santos-Fernandez, Edgar, Jay M. Ver Hoef, Erin E. Peterson, James McGree, Daniel Isaak, and Kerrie Mengersen. 2021. “Bayesian Spatio-Temporal Models for Stream Networks,” March. https://arxiv.org/abs/2103.03538v1.
Siade, Adam J., Tao Cui, Robert N. Karelse, and Clive Hampton. 2020. “Reduced‐Dimensional Gaussian Process Machine Learning for Groundwater Allocation Planning Using Swarm Theory.” Water Resources Research 56 (3). https://doi.org/10.1029/2019WR026061.
Siade, Adam J., Mario Putti, and William W. G. Yeh. 2010. “Snapshot Selection for Groundwater Model Reduction Using Proper Orthogonal Decomposition.” Water Resources Research 46 (8): W08539. https://doi.org/10.1029/2009WR008792.
Tait, Daniel J., and Theodoros Damoulas. 2020. “Variational Autoencoding of PDE Inverse Problems.” June 28, 2020. http://arxiv.org/abs/2006.15641.
Tartakovsky, Alexandre M., Carlos Ortiz Marrero, Paris Perdikaris, Guzel D. Tartakovsky, and David Barajas-Solano. 2018. “Learning Parameters and Constitutive Relationships with Physics Informed Deep Neural Networks,” August. https://arxiv.org/abs/1808.03398v2.
Tonkin, Matthew, and John Doherty. 2009. “Calibration-Constrained Monte Carlo Analysis of Highly Parameterized Models Using Subspace Techniques.” Water Resources Research 45 (12). https://doi.org/10.1029/2007WR006678.
White, Jeremy T. 2018. “A Model-Independent Iterative Ensemble Smoother for Efficient History-Matching and Uncertainty Quantification in Very High Dimensions.” Environmental Modelling & Software 109 (November): 191–201. https://doi.org/10.1016/j.envsoft.2018.06.009.
White, Jeremy T., Michael N. Fienen, and John E. Doherty. 2016a. pyEMU: A Python Framework for Environmental Model Uncertainty Analysis Version .01. U.S. Geological Survey. https://doi.org/10.5066/F75D8Q01.
———. 2016b. “A Python Framework for Environmental Model Uncertainty Analysis.” Environmental Modelling & Software 85 (November): 217–28. https://doi.org/10.1016/j.envsoft.2016.08.017.
Yu, Xiayang, Tao Cui, J. Sreekanth, Stephane Mangeon, Rebecca Doble, Pei Xin, David Rassam, and Mat Gilfedder. 2020. “Deep Learning Emulators for Groundwater Contaminant Transport Modelling.” Journal of Hydrology, August, 125351. https://doi.org/10.1016/j.jhydrol.2020.125351.

Warning! Experimental comments system! If is does not work for you, let me know via the contact form.

No comments yet!

GitHub-flavored Markdown & a sane subset of HTML is supported.