We have produced a series of tutorial notebooks to assist modellers in setting up and using model-partner software in ways that support the decision-support imperatives of data assimilation and uncertainty quantification. These tutorials provide an introduction to both the concepts and the practicalities of undertaking decision-support groundwater modelling with the PEST/PEST++ and pyEMU suites of software. Their aim is to provide examples of both “how to use” the software as well as “how to think” about using the software.
We have endeavoured to make these tutorials as accesible to as many people as possible. Workflows demonstrated herein are implemented programmaticaly in Python, employing functionality to interface with PEST/PEST++ available in pyEMU. However, concepts and the general approaches described are not limited to programmatic workflows. If you are interested in understanding how to implement pyEMU workflows, then you are encouraged to complete the jupyter notebooks yourself. If you just want to get a high-level understanding of decision-support modelling concepts and software, then you can simply read through the notebooks without having to run the code yourself.
GMDSI has also produced a separate set of tutorials which demonstrate non-programmatic approaches to working with PEST/PEST++ available here.
Familiarity with git would be a bonus, but not fundamental.
The notebooks in the tutorial
folder are organized in three main parts:
pyemu
python package that is used to interface with PEST++, and some of the mathematical concepts that come up throughout the tutorial notebooks. Note that the part1_02_pest_setup/freyberg_pest_setup.ipynb
notebook provides valuable context that will help with understanding the pyemu
introduction.To run the Part 0 notebooks The part 0 notebooks can be run in any order and do not depend on each other. We recommend, in particular, the first 3 topics as background for the rest of the tutorials, but the remaining part 0 notebooks stand alone for more theoretical basis and a reference for topics covered later.
To run the Part 1 notebooks The part 1 notebooks can also be run in any order and do not depend on each other.
To run the Part 2 notebooks
If you are going to go through the Part2 notebooks, you will need to run them in the following order:
From here you can optionally run each of the following sequences:
Prior Monte Carlo:
GLM and data worth:
PEST++IES:
PEST++DA:
PEST++OPT:
PEST++MOU:
IMPORTANT NOTE: When running some of these notebooks, PEST++ undertakes parallel model runs for computational efficiency. These runs are coordinated using internet communication protocols (e.g. TCP/IP). As a result, it is common (but not universal) that the first time a set of parallel runs is launched, a Windows Defender (or similar popup on other operating systems) box appears warning the user. This box can simply be closed by clicking "cancel" and then the model runs should proceed without issue.
Download the course repository:
You can do this in one of two ways.
Install Python and dependencies:
mamba env create -f environment.yml
(or conda env create -f environment.yml
if mamba
doesn't work for you). This will create an anaconda environment called "gmdsitut" and install the python dependencies required for this course. It may take a while. Should you wish, you can inspect the environment.yml file in the repo folder to see what dependecies are being installed.Start jupyter notebook You will need to do this step any time you wish to open one of the course notebooks. To start up the jupyter notebook:
conda activate gmdsitut
conda activate gmdsitut
Then navigate to folder where you downloaded the course materials repo and type jupyter notebook
A jupyter notebook instance should start within the course repo flder. Using the browser, you can now navigate to the "tutorials" folder and open one and you are in business!
These tutorials were originally developed with support from the U.S Geological Survey (USGS) and support from USGS continues. Continued development and support is funded by the Groundwater Modelling Decision Support Initiative (GMDSI). GMDSI is jointly funded by BHP and Rio Tinto.
To reference this material, please use the following: Hugman, R., White, J.T., Fienen, M.N., and Hunt, R.J., 2022, Parameter Estimation, Uncertainty Analysis, and Optimization with the PEST++ Family of codes: Tutorial Jupyter Notebooks: U.S. Geological Survey data release, https://doi.org/10.5066/P901F9G0.