PEST++: A Parameter ESTimation code optimized for large environmental models
The PEST++ software suite is object-oriented universal computer code written in C++ that expands on and extends the algorithms included in PEST, a widely used parameter estimation code written in Fortran. PEST++ is designed to lower the barriers of entry for users and developers while providing efficient algorithms that can accommodate large, highly parameterized problems.
PEST++ OVERVIEW
The PEST++ software suite is object-oriented universal computer code written in C++ that expands on and extends the algorithms included in PEST, a widely used parameter estimation code written in Fortran. PEST++ is designed to lower the barriers of entry for users and developers while providing efficient algorithms that can accommodate large, highly parameterized problems. This effort has focused on: (1) implementing and extending the most popular features of PEST in a way that is easy for novice or experienced modelers to use; and (2) creating a software design that is easy to extend with future advances.
All PEST++ suite source code and its associated libraries, as well as the general run manager source code, have been integrated in the Microsoft Visual Studio® 2013 integrated development environment. PEST++ is known to run on Windows®, Linux®, and Macintosh® operating systems.
The PEST++ code is written entirely in C++. Compilation of the code has been routinely accomplished by using the Intel compilers.
FAQs
How the PEST++ Software Suite differs from PEST
What is new in the PEST++ Software Suite?
Although PEST++ is based on PEST, PEST++ originally implemented a subset of the most used PEST functions and focused on providing simpler and more robust access to the most frequently used capabilities of PEST. With the release of PEST++ Version 5 this approach continued, but also provided new capabilities to the user. PEST++ additions, enhancements, and changes include the following:
- PEST++ Version 5 has many internal default values that allow users to try advanced capabilities with minimal user input. All default values can be overridden by user-specified PEST++ arguments.
- TCP/IP parallel run manager: a BeoPEST/PEST-HP-like integrated TCP/IP run manager has been implemented
- Global sensitivity analysis (PESTPP-SEN) using the Methods of Sobol and Morris.
- Linear uncertainty analyses are directly accessible PEST++ run output.
- PEST++ automatically switches between native parameters and superparameters without user intervention.
- Gauss-Marquardt-Levenberg (PESTPP-GML) capabilities are refined over Version 3.
- An Iterative ensemble smoother algorithm (PESTPP-IES) allows computationally efficient history matching and uncertainty calculation for very highly parameterized models
- A tool for management optimization (PESTPP-OPT) under uncertainty solves optimization problems using the PEST template and instruction file design.
- Monte Carlo realizations can automatically drawn from the parameter bounds and run using the run manager allowing for seamless access to non-linear uncertainty estimates.
- PEST++ has a user-friendly alternative input option that uses keyword-value pairs and supports external comma-separated-value files for the “parameter groups,” “parameter data,” “observation data,” and “prior information” sections of the control file.
- A performance log is available to facilitate identifying potential areas to speed actions of the PEST++ suite.
What are some of the limitations of PEST++?
Most notably, the limitations of PEST++ Version 5 are as follows:
- Use of a full observation noise covariance matrix is supported for the FOSM-based uncertainty calculations in PESTPP-GLM and in PESTPP-IES. However, a full observation noise covariance matrix is not supported in the PESTPP-GLM upgrade calculation process.
- Similar to an SVD-Assist run in PEST, PESTPP-GLM does not perform a final run with the best parameters. This requires the user to construct and execute a final run locally when using parallel run management. However, PEST++ does provide the best-fit parameter values, as well as the model output corresponding to observations and residuals associated with the best model run, so that a user simply needs to update the control file with the best parameters and rerun PEST++ with NOPTMAX set to 0. The Jacobian (.jco) file for PESTPP-GLM superparameter iterations is written in terms of the superparameters, whereas PESTPP-GLM writes the base parameter Jacobian to a .jcb file. Both of these files are compatible with the PEST .jco file specification.
- The localization solution of PESTPP-IES requires solving for each adjustable parameter using the observations that meet localization criteria. As such, a localized solution for 500,000 or more parameters can take substantial time, depending on the number of observations. The ies_num_threads option will invoke a multithreaded solution process that can reduce the solve time.
- PESTPP-IES uses weights listed in the control file for two purposes. First, these weights are used during upgrade calculations and for formation of the objective function. This is how PESTPP-GLM, as well as PEST (and PEST_HP) use weights. But PESTPP-IES also uses weights for generating realizations of measurement noise through the covariance matrix implied by these weights, making use of the theoretical definition of weights as the inverse of observation noise. These two uses can be in conflict if weights are adjusted subjectively to balance the objective function and steer the upgrade process towards the components of the objective function that are most important for decision support purposes. In this case, the realizations of noise generated from the subjectively adjusted weights may not be representative of observation noise. In this case, users can generate a noise ensemble external to PESTPP-IES with the PEST utilities or pyEMU before subjectively adjusting the weights, or users can employee the ies_no_noise option to ignore the contribution of measurement noise in the posterior parameter ensemble.
Compatibility with PEST
Will my PEST control file (*.pst) run in PEST++?
Yes, to make switching between PEST++ and the additional capabilities in PEST easier, PEST++ reads variables and structure of the PEST control file. PEST++ relies on the structure of the PEST input file to set PEST++ input, but reads only those input that are necessary for PEST++ operation. Information in the PEST control needed to invoke PEST++ capabilities is specified on lines starting with "++". PEST++ input can reside in a single section at the end of the PEST control file, but structuring the file as such is not required; this information does not need to be contiguous and can reside anywhere in the PEST control file. Lines starting with "++#" are considered comments and are ignored. In addition, PEST++ Version 5 allows an alternative more human-readable input format option; use of this option, however, will break the interoperability with PEST. Appendix 1 of White and others (2020) describes this interoperability and alternative input option in more detail.
Will PEST read my PEST++ control file?
Yes, PEST has been modified by the author John Doherty to ignore lines starting with "++" in the PEST control file.
Do the PEST utilities work with PEST++?
This was a design goal of PEST++. In order to facilitate use by experienced PEST users, PEST++ adopts many of the conventions, variable names, and output formats of the original PEST. PEST++ was designed to make input and output compatible with the large number of existing PEST utilities. However, PEST++ does not contain all capabilities of PEST. Therefore, any utilities that assume a PEST input or output not included in PEST++ will not work.
Selected Reports, Articles and Related Background Material
(See the Publications tab above for links to other official USGS publications.)
Anderson, M.P., Woessner, W.W. and Hunt, R.J., 2015, Applied Groundwater Modeling: Simulation of Flow and Advective Transport (2nd Edition). Academic Press, Inc. 564 p. ISBN 9780120581030.
Dahlstrom, D.J., and Carter, J.T.V., 2013, Inverse Modeling with PEST++ and GENIE. Groundwater 51(2): 162-167. doi:10.1111/gwat.12021
Doherty, J., 2015, PEST - The Book: Calibration and Uncertainty Analysis for Complex Environmental Models. Watermark Numerical Computing, Brisbane, Australia, ISBN: 978-0-9943786-0-6, 227 p.
Hunt, R.J., Doherty, J., and Tonkin, M.J., 2007, Are models too simple? Arguments for increased parameterization: Ground Water, v. 45, no. 3, p. 254–262. https://doi.org/10.1111/j.1745-6584.2007.00316.x.
Hunt, R.J., Fienen, M.N., and White, J.T., 2019, Revisiting “An exercise in groundwater model calibration and prediction” after 30 years—Insights and new directions: Ground Water, v. 58, no. 2, p. 168–182. https://doi.org/10.1111/gwat.12907.
Welter, D.E., Doherty, J.E., Hunt, R.J., Muffels, C.T., Tonkin, M.J., and Schreüder, W.A., 2012, Approaches in highly parameterized inversion—PEST++, a Parameter ESTimation code optimized for large environmental models: U.S. Geological Survey Techniques and Methods, book 7, section C5, 47 p. https://doi.org/10.3133/tm7C5.
Welter, D.E., White, J.T., Hunt, R.J., and Doherty, J.E., 2015, Approaches in highly parameterized inversion: PEST++ Version 3, a Parameter ESTimation and uncertainty analysis software suite optimized for large environmental models: U.S. Geological Survey Techniques and Methods, book 7, section C12, 54 p. https://doi.org/10.3133/tm7C12.
Welter, D.E., Doherty, J.E., and White, J.T., 2018, PANTHER parallel model run manager: Brisbane, Australia, Watermark Numerical Computing, 66 p.
White, J.T., 2018, A model-independent iterative ensemble smoother for efficient history-matching and uncertainty quantification in very high dimensions: Environmental Modelling & Software, v. 109, p. 191–201. https://doi.org/10.1016/j.envsoft.2018.06.009.
White, J.T., Fienen, M.N., Barlow, P.M., and Welter, D.E., 2018, A tool for efficient, model-independent management optimization under uncertainty: Environmental Modelling & Software, v. 100, p. 213–221. https://doi.org/10.1016/j.envsoft.2017.11.019.
White, J.T., Hunt, R.J., Fienen, M.N., and Doherty, J.E., 2020, Approaches to Highly Parameterized Inversion: PEST++ Version 5, a Software Suite for Parameter Estimation, Uncertainty Analysis, Management Optimization and Sensitivity Analysis: U.S. Geological Survey Techniques and Methods 7C26, 51 p., https://doi.org/10.3133/tm7C26.
Below are publications associated with this project.
Approaches in highly parameterized inversion - PEST++, a Parameter ESTimation code optimized for large environmental models
Approaches to highly parameterized inversion-A guide to using PEST for groundwater-model calibration
Approaches to highly parameterized inversion: A guide to using PEST for model-parameter and predictive-uncertainty analysis
The PEST++ software suite is object-oriented universal computer code written in C++ that expands on and extends the algorithms included in PEST, a widely used parameter estimation code written in Fortran. PEST++ is designed to lower the barriers of entry for users and developers while providing efficient algorithms that can accommodate large, highly parameterized problems.
PEST++ OVERVIEW
The PEST++ software suite is object-oriented universal computer code written in C++ that expands on and extends the algorithms included in PEST, a widely used parameter estimation code written in Fortran. PEST++ is designed to lower the barriers of entry for users and developers while providing efficient algorithms that can accommodate large, highly parameterized problems. This effort has focused on: (1) implementing and extending the most popular features of PEST in a way that is easy for novice or experienced modelers to use; and (2) creating a software design that is easy to extend with future advances.
All PEST++ suite source code and its associated libraries, as well as the general run manager source code, have been integrated in the Microsoft Visual Studio® 2013 integrated development environment. PEST++ is known to run on Windows®, Linux®, and Macintosh® operating systems.
The PEST++ code is written entirely in C++. Compilation of the code has been routinely accomplished by using the Intel compilers.
FAQs
How the PEST++ Software Suite differs from PEST
What is new in the PEST++ Software Suite?
Although PEST++ is based on PEST, PEST++ originally implemented a subset of the most used PEST functions and focused on providing simpler and more robust access to the most frequently used capabilities of PEST. With the release of PEST++ Version 5 this approach continued, but also provided new capabilities to the user. PEST++ additions, enhancements, and changes include the following:
- PEST++ Version 5 has many internal default values that allow users to try advanced capabilities with minimal user input. All default values can be overridden by user-specified PEST++ arguments.
- TCP/IP parallel run manager: a BeoPEST/PEST-HP-like integrated TCP/IP run manager has been implemented
- Global sensitivity analysis (PESTPP-SEN) using the Methods of Sobol and Morris.
- Linear uncertainty analyses are directly accessible PEST++ run output.
- PEST++ automatically switches between native parameters and superparameters without user intervention.
- Gauss-Marquardt-Levenberg (PESTPP-GML) capabilities are refined over Version 3.
- An Iterative ensemble smoother algorithm (PESTPP-IES) allows computationally efficient history matching and uncertainty calculation for very highly parameterized models
- A tool for management optimization (PESTPP-OPT) under uncertainty solves optimization problems using the PEST template and instruction file design.
- Monte Carlo realizations can automatically drawn from the parameter bounds and run using the run manager allowing for seamless access to non-linear uncertainty estimates.
- PEST++ has a user-friendly alternative input option that uses keyword-value pairs and supports external comma-separated-value files for the “parameter groups,” “parameter data,” “observation data,” and “prior information” sections of the control file.
- A performance log is available to facilitate identifying potential areas to speed actions of the PEST++ suite.
What are some of the limitations of PEST++?
Most notably, the limitations of PEST++ Version 5 are as follows:
- Use of a full observation noise covariance matrix is supported for the FOSM-based uncertainty calculations in PESTPP-GLM and in PESTPP-IES. However, a full observation noise covariance matrix is not supported in the PESTPP-GLM upgrade calculation process.
- Similar to an SVD-Assist run in PEST, PESTPP-GLM does not perform a final run with the best parameters. This requires the user to construct and execute a final run locally when using parallel run management. However, PEST++ does provide the best-fit parameter values, as well as the model output corresponding to observations and residuals associated with the best model run, so that a user simply needs to update the control file with the best parameters and rerun PEST++ with NOPTMAX set to 0. The Jacobian (.jco) file for PESTPP-GLM superparameter iterations is written in terms of the superparameters, whereas PESTPP-GLM writes the base parameter Jacobian to a .jcb file. Both of these files are compatible with the PEST .jco file specification.
- The localization solution of PESTPP-IES requires solving for each adjustable parameter using the observations that meet localization criteria. As such, a localized solution for 500,000 or more parameters can take substantial time, depending on the number of observations. The ies_num_threads option will invoke a multithreaded solution process that can reduce the solve time.
- PESTPP-IES uses weights listed in the control file for two purposes. First, these weights are used during upgrade calculations and for formation of the objective function. This is how PESTPP-GLM, as well as PEST (and PEST_HP) use weights. But PESTPP-IES also uses weights for generating realizations of measurement noise through the covariance matrix implied by these weights, making use of the theoretical definition of weights as the inverse of observation noise. These two uses can be in conflict if weights are adjusted subjectively to balance the objective function and steer the upgrade process towards the components of the objective function that are most important for decision support purposes. In this case, the realizations of noise generated from the subjectively adjusted weights may not be representative of observation noise. In this case, users can generate a noise ensemble external to PESTPP-IES with the PEST utilities or pyEMU before subjectively adjusting the weights, or users can employee the ies_no_noise option to ignore the contribution of measurement noise in the posterior parameter ensemble.
Compatibility with PEST
Will my PEST control file (*.pst) run in PEST++?
Yes, to make switching between PEST++ and the additional capabilities in PEST easier, PEST++ reads variables and structure of the PEST control file. PEST++ relies on the structure of the PEST input file to set PEST++ input, but reads only those input that are necessary for PEST++ operation. Information in the PEST control needed to invoke PEST++ capabilities is specified on lines starting with "++". PEST++ input can reside in a single section at the end of the PEST control file, but structuring the file as such is not required; this information does not need to be contiguous and can reside anywhere in the PEST control file. Lines starting with "++#" are considered comments and are ignored. In addition, PEST++ Version 5 allows an alternative more human-readable input format option; use of this option, however, will break the interoperability with PEST. Appendix 1 of White and others (2020) describes this interoperability and alternative input option in more detail.
Will PEST read my PEST++ control file?
Yes, PEST has been modified by the author John Doherty to ignore lines starting with "++" in the PEST control file.
Do the PEST utilities work with PEST++?
This was a design goal of PEST++. In order to facilitate use by experienced PEST users, PEST++ adopts many of the conventions, variable names, and output formats of the original PEST. PEST++ was designed to make input and output compatible with the large number of existing PEST utilities. However, PEST++ does not contain all capabilities of PEST. Therefore, any utilities that assume a PEST input or output not included in PEST++ will not work.
Selected Reports, Articles and Related Background Material
(See the Publications tab above for links to other official USGS publications.)
Anderson, M.P., Woessner, W.W. and Hunt, R.J., 2015, Applied Groundwater Modeling: Simulation of Flow and Advective Transport (2nd Edition). Academic Press, Inc. 564 p. ISBN 9780120581030.
Dahlstrom, D.J., and Carter, J.T.V., 2013, Inverse Modeling with PEST++ and GENIE. Groundwater 51(2): 162-167. doi:10.1111/gwat.12021
Doherty, J., 2015, PEST - The Book: Calibration and Uncertainty Analysis for Complex Environmental Models. Watermark Numerical Computing, Brisbane, Australia, ISBN: 978-0-9943786-0-6, 227 p.
Hunt, R.J., Doherty, J., and Tonkin, M.J., 2007, Are models too simple? Arguments for increased parameterization: Ground Water, v. 45, no. 3, p. 254–262. https://doi.org/10.1111/j.1745-6584.2007.00316.x.
Hunt, R.J., Fienen, M.N., and White, J.T., 2019, Revisiting “An exercise in groundwater model calibration and prediction” after 30 years—Insights and new directions: Ground Water, v. 58, no. 2, p. 168–182. https://doi.org/10.1111/gwat.12907.
Welter, D.E., Doherty, J.E., Hunt, R.J., Muffels, C.T., Tonkin, M.J., and Schreüder, W.A., 2012, Approaches in highly parameterized inversion—PEST++, a Parameter ESTimation code optimized for large environmental models: U.S. Geological Survey Techniques and Methods, book 7, section C5, 47 p. https://doi.org/10.3133/tm7C5.
Welter, D.E., White, J.T., Hunt, R.J., and Doherty, J.E., 2015, Approaches in highly parameterized inversion: PEST++ Version 3, a Parameter ESTimation and uncertainty analysis software suite optimized for large environmental models: U.S. Geological Survey Techniques and Methods, book 7, section C12, 54 p. https://doi.org/10.3133/tm7C12.
Welter, D.E., Doherty, J.E., and White, J.T., 2018, PANTHER parallel model run manager: Brisbane, Australia, Watermark Numerical Computing, 66 p.
White, J.T., 2018, A model-independent iterative ensemble smoother for efficient history-matching and uncertainty quantification in very high dimensions: Environmental Modelling & Software, v. 109, p. 191–201. https://doi.org/10.1016/j.envsoft.2018.06.009.
White, J.T., Fienen, M.N., Barlow, P.M., and Welter, D.E., 2018, A tool for efficient, model-independent management optimization under uncertainty: Environmental Modelling & Software, v. 100, p. 213–221. https://doi.org/10.1016/j.envsoft.2017.11.019.
White, J.T., Hunt, R.J., Fienen, M.N., and Doherty, J.E., 2020, Approaches to Highly Parameterized Inversion: PEST++ Version 5, a Software Suite for Parameter Estimation, Uncertainty Analysis, Management Optimization and Sensitivity Analysis: U.S. Geological Survey Techniques and Methods 7C26, 51 p., https://doi.org/10.3133/tm7C26.
Below are publications associated with this project.