Sie sind auf Seite 1von 18

WinPEST Tutorial

A quick and easy-to-use tutorial that will guide you through some of the basic
concepts associated with Visual MODFLOW’s WinPEST progam.

1999, Watermark Numerical Computing & Waterloo Hydrogeologic Inc.


PEST Tutorial 1
Project Background 1
Terms and Notations 4
Setting up the Visual MODFLOW model 4
Defining the Hydraulic Parameters 7
Preparing for the automatic calibration with PEST 8
Running PEST 13
Alternative Calibrations 15
Accuracy of the Calibrations 16

1999, Watermark Numerical Computing & Waterloo Hydrogeologic Inc.


PEST Tutorial
This tutorial is designed to introduce the user to the features available in the WinPEST
module of the Visual MODFLOW program. The tutorial will guide you through
• opening an existing model,
• preparing the model for a PEST run, and
• using PEST to calibrate your model.
Unlike the previous tutorial this tutorial is not written in a step-wise format. Instead,
this tutorial is structured so that you, the user, can alter parameters as you see fit. This
tutorial not only allows you to become familiar with both the advantages and
limitations of the WinPEST package but will also familiarize you with the package
and assist you in the calibration of your own models.

Project Background
Figure 1 shows an alluvial valley in which two production wells (pbore_1 and
pbore_2) are located. In addition, there are two observation bores (obore_1 and
obore_2) within the study area. The valley alluvium is comprised of a central portion
of relatively coarse sediments where hydraulic conductivity and specific yield are
high. Near the edge of the valley the sediments become finer, and both hydraulic
conductivity and specific yield decrease. Groundwater movement within the valley
will be simulated for a single year.
T ota l Inflo w =2 7 5 0 cu m /day

K = K 2 m /d ay
S =S 2

F ixe d he ad = 50 m
p b ore_ 1

o bo re _ 2 o b ore_ 1 K = K 1 m /d ay
S =S 1
p bo re _ 2

K = K 3 m /d ay
S =S 3

Figure 1: Alluvial valley.

In Figure 2 the active part of the finite difference grid is superimposed on the model
domain. All cells are 12.5m wide in the row direction and 10m high in the column
direction. Figure 3 shows the property zonation used in the model.

Project Background 1
F ixed h ead cells

Figure 2: Finite difference grid superimposed on the model domain.

Figure 3: Property zonation used in the model.

Recharge, which shows seasonal variation, is graphed in Figure 4 and pumping rates
for the two production wells, which are also seasonally dependent, are shown in
Figure 5. Given the seasonally varying boundary conditions, the modeled year is
divided into 4 stress periods of 15 time steps each. Each stress period is 91.3 days in
length (totalling 365.2 days), and the time step multiplier is 1.2.

2 PEST Tutorial
2E -3

R echarge (m /day)
1E -3

0E +0
0 100 200 300
T im e (days)

Figure 4: Recharge rate over the model simulation time.

2000 p bo re_ 2 2000 p bo re_ 1


P u m ping R a te

1000 1000

0 0
0 100 200 300 0 100 200 300
T im e (d ays) T im e (d ays)
Figure 5: Pumping rates (in m3/day) for the two production wells.

When the tutorial file valley.vmf was created, the model was run using a specific set of
conductivity and storage values. After obtaining the output data set, the values for the
conductivity and storage were altered. Figure 6 shows the water levels calculated by
our model at the two observation wells. You will use these data points as your
observation data.
In order to evaluate your calibration of the model using WinPEST, you will attempt to
vary the conductivity and storage parameters so that your simulated results
approximate the observed results. The objective of this exercise is for you to use
WinPEST to calibrate your model and determine what values were used during the
original model run.

Project Background 3
56 56
W a te r L e ve l (m e tre s)

o bo re_ 2 o bo re_ 1

52 52

48 48
0 1 00 2 00 3 00 0 1 00 2 00 3 00
T im e (da ys) T im e (da ys)
Figure 6: Calculated water levels in the observation wells.

Terms and Notations


For the purposes of this tutorial, the following terms and notations will be used:
type: - type in the given word or value
select: - click the left mouse button where indicated
Ù - press the <Tab> key
↵ - press the <Enter> key
) - click the left mouse button where indicated
)) - double-click the left mouse button where indicated

Setting up the Visual MODFLOW model


The Visual MODFLOW input files for this tutorial will be copied to your working
directory when the tutorial files are selected during installation. Start Visual
MODFLOW Version 2.8 .1 and open the Visual MODFLOW file valley.vmf.
As supplied, the model has three hydraulic conductivity zones (all hydraulic
conductivities are 10 m/day) and one storage zone (specific yield is 0.10%). These
values, as well as the boundary conditions described in the previous section, should be
verified in the Input mode by visiting the Wells, Properties and Boundaries modules
of the Visual MODFLOW interface (plot well pumping rates using the Graph
function). You may also verify that initial head is 50m at the eastern boundary of the
model.
Before running the model, you must import the field “observations”.
) Input

4 PEST Tutorial
) Wells (from the top menu bar)
) Head Observation Wells (from the drop-down menu)
) Add Obs. (on the left hand button bar)

Now click somewhere in the vicinity of obore_1 as depicted in Figure 1. The New
Well dialogue will appear. Type in the well name and co-ordinates as shown in the
table below.

X-Coord Y-Coord Obs. Elevation Data file for import

obore_1 131.25 65 30 obore_1.txt

obore_2 81.25 55 30 obore_2.txt

In most practical cases, borehole observation data is voluminous – too voluminous to


type in by hand. So, you will import the observations from an ASCII text file. In the
Observations section of the Well Edit dialogue, click on the Load Observations
Items from ASCII File button.

Import the file obore_1.txt. Measurement times are in Column 1 and the
measurements themselves are in Column 4.
Repeat for the second observation well, obore_2.
Return to the main menu, saving calibration data. Go to the Run module and select
Transient in the Select Run Type dialogue. Verify that the model will run for four
stress periods each of 91.3 days duration, by looking in the MODFLOW/Time Steps
options. Now, under MODFLOW/Solver select the WHS Solver and change the
Head change criterion for convergence to 0.0001 (the Residual criterion for
convergence should also be set to 0.0001 by default, but this is not critical). When
MODFLOW is run under the control of PEST a tight convergence criterion is

Setting up the Visual MODFLOW model 5


necessary. This will ensure that PEST correctly calculates the derivatives of the model
outputs, with respect to adjustable parameters.
Now run MODFLOW by
) Run (from the drop-down menu bar)
) Translate & Run (make sure only the MODFLOW box is checked)

When the model has completed its calculations, go to the Output module to compare
the calculated heads to the observed values.
) Graphs (on the left button bar)

The Calibration Plots dialogue will appear. In order to evaluate the calibration,
compare the fit between your model-generated heads and the “observed” heads at the
two observation bores.
In the Groups section at the left of the dialogue select the two observation bores by
clicking the boxes associated with the W1.obore_1 and W2.obore_2 observation
groups.

) Apply (to update the graph)


) View (from the top menu bar)
) Head vs. Time (from the drop-down menu)

The graph will change to a plot of measured versus


model-generated heads at the observation bores, as seen
below. It is apparent that our model is a long way from
being calibrated.

6 PEST Tutorial
Defining the Hydraulic Parameters
As discussed previously, conductivity zones for the inner and outer alluvium have
been created based on known geological boundaries. At present, these zones have the
same conductivity value and aquifer storage is assigned constant across the domain.
Before you attempt to estimate any parameters, you must define 3 separate zones for
the storage properties that correspond to the 3 conductivity zones already defined.
Close the output graphs, return to the Input mode and select Storage from the
Properties pull-down menu. To make it easier to define the same storage zonation as
the hydraulic conductivity zonation, turn on the hydraulic conductivity zones by using
the F9 – Overlay function. You may have to change the overlay order to make the
conductivity layer visible. Also you may want to use the Settings… button to make
the conductivity zones appear as outlines rather than colour-filled (turn off the Grid
overlay if you use this option).
Create two new storage zones and assign them following values:
Ss [1/m] 0.00001
Sy [-] 0.1
Porosity 0.1 (effective and total)

Defining the Hydraulic Parameters 7


Neither Ss nor porosity are used in this calibration. Ss is only used for confined layers
and this model only has one layer. The effective porosity is used forMODPATH
particle tracking and the total porosity is used in the MT3D calculations – neither of
these programs are used in this exercise.
During this calibration exercise you will assume that recharge is a well defined
quantity, and that the only parameters that will require estimation are the hydraulic
conductivity and specific yield. You have now defined six variables based on two
parameters in each of three zones. You will now attempt to adjust these parameter
values until the modeled and observed water levels in the boreholes match as closely
as possible.
You may wish to spend some time at this point trying to calibrate your model “by
hand”. Try adjusting the three hydraulic conductivity values and the three specific
yield values to see if you can get the model to generate heads that match the
observations.

Preparing for the automatic calibration with PEST


Return to the Run module and select PEST. In the PEST Control Window dialogue,
use the “parameter tree” to select the 3 Kx values (our model is isotropic) and 3 Sy
values that WinPEST will estimate. Click on the “+” signs to expand the branches of
the tree as needed.
After you have selected parameters for estimation, the PEST Control Window
dialogue should appear as shown below.

8 PEST Tutorial
If you click on the Switch to Parameter Table View, the display will switch to a
spreadsheet view.

Preparing for the automatic calibration with PEST 9


In the table view, you will see parameter details displayed in a form similar to the
PEST control file. Here you can set parameter upper and lower bounds, inform PEST
whether a parameter is to be fixed, log-transformed or tied to another parameter, etc.
Furthermore, the Parameter Groups section of the dialogue contains the variables
that determine how PEST calculates the derivatives of the model outcomes with
respect to the adjustable parameters. Proper settings for these variables can determine
the success or failure of a parameter-estimation run. The default values for the PEST
control variables supplied by Visual MODFLOW are suitable for most occasions.
Visual MODFLOW has automatically set the hydraulic conductivity and specific
yield parameters to be log transformed – this is always a good idea. The initial
parameter values for the parameter estimation process are the same as those assigned
to the respective model zones. You can alter these by directly editing the table if you
wish. Notice also that the parameter upper and lower bounds have been set to include
a wide range of values. By retaining the boundary values you can evaluate variables
which may be climbing or falling unchecked during the iterative process or parameter
estimation. Alternatively, you can set the bounds more realistically according to your
experience with a particular site.
When estimating parameters for a model, it is advisable to begin simply then slowly
increase the complexity of your solution. A simple way to do this is to tie some of the
parameters together so that they are varied identicall . Tied parameters retain the
same ratio throughout the iterative estimation process.
For this tutorial you will begin by reducing the number of adjustable parameters from
6 to 2 by tying some of them together. First, set all K x initial values to 1.0 (leave all Sy

10 PEST Tutorial
initial values at 0.1). Next, tie parameters Kx_2 and Kx_3 to parameter Kx_1 by
clicking in the Is Tied T column and then on the […] button that appears in the
column as shown below. You may have to make the dialogue larger and the columns
of the PEST Control dialogue wider by dragging on their boundaries with a mouse.
Once you have selected the [...] button the Parameter transformation dialogue will
appea .

Select the tied to radio button and then select Cndct1_kx, the Kx conductivity for
property 1, from the combo box.
Repeat the above for Kx_3 and tie Sy_2 and Sy_3 to parameter Sy_1. Note that a
parameter cannot be tied to another tied parameter – only to an adjustable parameter.
When you are done, the PEST Control Window should appear as below.

Now you must specify which observations PEST will use to decide whether the model
is calibrated or not. The combination of these observations is known as the Objective

Preparing for the automatic calibration with PEST 11


Function. The WinPEST interface allows you to specify head, concentration and flow
data as part of the objective function.
To specify the objective function, select the Objective Function tab. This tutorial
only deals with head data. Therefore, ensure that only the Head box is checked, and
then check the two observations groups, W1.obore_1 and W2.obore_2. Your PEST
Control dialogue should now appear as follows:

By default, Visual MODFLOW automatically assigned each observation well to its


own observation group. During the run, PEST calculates how much each group of
observations contributes to the improvement of the objective function. If you have a
lot of observation wells, you can use the observation group function to combine
observations from different areas of the model into new groups. For example, you
may have observation wells in three different areas of your site. The observations in
the three different areas could be grouped together and the influence of each group on
the objective function could be determined.
Ideally, each of the three groups should contribute equally to the objective function.
However, you might have 20 wells in one area but only 5 wells in another area. The
calibration in the area with more wells will have a much greater influence on the
objective function. This can be remedied by assigning weights to the groups, such that
the two groups affect the objective function more equitably.
The final step is to go to the Controls tab. In this tab are the variables that appear in
the “Control Data” section of the PEST control file. For most cases, the default values
supplied by Visual MODFLOW are fine. Once you are satisfied with the

12 PEST Tutorial
configuration of the PEST information, click on the File menu item and then Save &
Exit to quit the dialogue.
You are now ready to run PES .

Running PEST
Still in the Visual MODFLO Run mode, click on Run in the top menu bar to bring
up the Translate/Run dialogue, where you must now select both MODFLOW and
PEST. Now start the Translation & Run to translate the MODFLOW and PEST files
and start the WinPEST dialogue.
WinPEST automatically loads the PEST control file. At this time you could begin the
PEST run. However, WinPEST is supplied with a checking routine, called
PESTCHECK, that checks the entire PEST data set (including template and
instruction files cited in the PEST control file) for consistency and accuracy. While
Visual MODFLOW is not likely to produce an erroneous PEST input data set, it is a
good practice to run PESTCHECK. Running the PESTCHECK routine will only take
a few seconds and can be monitored in the status bar at the bottom of the WinPEST
window.
To run PESTCHEK, from the Run top menu select Check and then All. PESTCHEK
checks the entire PEST data set. If any errors are found, the offending file is opened in
the dialogue, where it can be inspected and edited if necessary. If you edit a file,
remember to save your changes. Alternatively, WinPEST can be closed and the error
corrected in the Run or Input modes as necessary.
When you have completed this procedure, click on the Run Project icon. and
select Start from Scratch in the drop-down menu.
PEST then begins to estimate the parameters. Select the PEST Log tab to monitor the
real-time progress of PEST’s parameter optimization.
PEST runs a “model” that is actually comprised of two models. These are
MODFLOW and MODBORE. MODBORE is a program that spatially and temporally
interpolates from the MODFLOW finite-difference grid and time steps to the
locations and times in the observations. Through these two programs the “model”
produces numbers that can be directly compared to field observations.
During PEST execution you can view a number of useful pieces of information, many
of them in graphical form. The PEST log records a summary of the history of the
optimization process. A more detailed history of the optimization process can be
found in file valley.rec (the PEST run record) which is displayed by WinPEST after
PEST has finished execution. Real-time graphs of the changing Parameter Values,
their Composite Sensitivities and the Objective Function can be displayed by
selecting the View/Plots… menu item. The Composite Sensitivity plot depicts
changes in parameter sensitivity over time. In this model, there are only two
adjustable parameters, i.e. Kx_1 and Sy_1. Calculation of their sensitivity takes into
account the fact that the other Kx and Sy parameters are tied to each of them. In this
model, x is a more sensitive parameter than Sy. The real-time change in the

Running PEST 13
Marquardt Lambda from iteration to iteration can also be viewed. At the end of the
simulation, a graph of Calculated vs. Observed values can be plotted. In all of these
plots, clicking with the right mouse on the graphs and selecting Properties will allow
you to alter the appearance of the plots.
You can pause PEST execution at any time by pressing on the Pause PEST icon ( ) .
Both PEST and the model immediately cease execution. To restart both PEST and the
model click on the Start icon. If you click on the Stop with Statistics button ( ),
PEST ceases execution after running to the end of the current simulation. You can
restart PEST at the same place later by selecting the appropriate options in the Run or
Options menu items.
After you have inspected the runtime plots generated by PEST, return to the PEST
log. You can wait until the PEST run finishes, which takes about 8 iterations, or you
can stop the PEST execution manually after 7 iterations. Once the model has stopped
executing, you can view the fit between modeled and observed heads. Without
shutting down WinPES , maximize Visual MODFLOW from the taskbar at the
bottom of your screen. Select the Head vs. Time plot from the Graphs command in
the Output mode. As seen below, the fit between modeled and observed heads at both
observation bores is now appears accurate.

At this point you must use your judgement and evaluate for yourself;

14 PEST Tutorial
[1] Is the model calibrated properly?
[2] Are the parameter values calculated realistic?
[3] What is the statistical accuracy and/or precision between the observed and
calculated values for head?

To view the PEST-calculated parameter values, toggle back to WinPEST. Select the
PEST Log tab and scroll down to the bottom of the window. The values listed under
Current Parameter Values are the most recently calculated parameter values.

Note: In many cases these parameter values may not be the


optimum values calculated by PEST – just the last values.

The optimum values can be found in the .PAR file. You can open and view this file by
selecting File/Open/File from the top menu and choosing the file valley.pa .
Depending on whether PEST finished execution or was halted before it was stopped,
the parameter values should be about 14.3m/day for the alluvium hydraulic
conductivity and about 0.22 for the alluvium specific yield. The objective function is
about 0.33. The actual values can be seen by clicking on the data points in the graph.
As is described in the PEST manual, PEST calculates several important statistics
which can help you interpret the results of the parameter estimation process. These
include the covariance, correlation coefficient and eigenvector matrices. At the end of
a PEST run these plots are also available. The covariance matrix is indicative of the
amount of uncertainty in the parameter estimate. Thus, in this model there is
considerably more uncertainty associated with the storage parameter than the
conductivity. The correlation coefficient matrix always has diagonal elements equal to
1. The degree of correlation between parameters is determined by examining the off-
diagonal elements. Large off-diagonal elements indicate a strong cross correlation. In
this model there is little correlation between hydraulic conductivity and specific yield.
The eigenvector plot can also be used to determine the amount of correlation between
parameters. An eigenvector that contains two or more parameters with large values
means that if those parameters were changed at the same time and in the same ratio as
their eigenvalues, then the objective function would change very little.

Alternative Calibrations
Now you will “untie” some of the parameters that were previously tied. There are two
ways to do this. The first is to go back into Visual MODFLOW. The alternative is to
edit the PEST control file directly within WinPEST and then to save it. We
recommend the former as it is less likely to cause serious errors. Close WinPEST,
close the Calibration dialogue (where the head vs. time plots are displayed), go back
into the Run mode and bring up the PEST Control dialogue.
Alternative Calibrations 15
Untie Kx_3 and Kx_2 from Kx_1 and tie Kx_3 to Kx_2. This will ensure that the
outer alluviums have the same hydraulic conductivity. Assign all specific yields an
initial value of 0.1 and tie parameter Sy_3 to Sy_2 after untying each of them from
parameter Sy_1. You will have to re-select the wells for your objective function.
Now, run PEST as before (be sure to run PESTCHEK to check that the Visual
MODFLOW-generated PEST input dataset is consistent and correct).
Stop PEST after 7 the seventh iteration is complete (i.e. stop the process when
WinPEST begins the eighth iteration). Repeat the procedure to view the fit between
model and observations. After 7 iterations the objective function should be about
0.082 and hydraulic conductivity values should be about 19.67 m/day for the inner
alluvium and 9.58 m/day for the outer alluvium. Estimated specific yield values
should be about 0.242 for the inner alluvium and about 0.181 for the outer alluvium.
The fit between measured and modeled heads at the two observation bores is
excellent.
Now, run PEST one more time. This time do not tie any parameters to any other
parameters so that there are six adjustable parameters altogether. Stop PEST when you
think that the objective function is sufficiently low. In my case I stopped it after 8
iterations when the objective function was 1.36e-3. Estimated hydraulic conductivities
were 3.54 m/day and 5.47 m/day for the southern and northern outer alluviums
respectively, and 25.39 m/day for the inner alluvium. Estimated specific yields were
0.089 and 0.114 for the southern and northern outer alluviums respectively, and 0.297
for the inner alluvium. Verify, once again, that the fits between model-generated and
observed heads at the observation bores are excellent.

Accuracy of the Calibrations


You have now calibrated the model three times and received a near-perfect fit
between the calculations and observations on each occasion. Which is the “correct”
parameter set? The parameter set that was used to generate the “field data” was 5m/
day for the northern and southern outer alluvial hydraulic conductivities, 25m/day for
the inner alluvial hydraulic conductivity, 0.1 for the northern and southern outer
alluvium specific yields and 0.30 for the inner alluvium specific yield.
Each of the solutions you received were slightly different than the initial conditions
setup for you as “observations”. This effectively illustrates some of the advantages
and limitations of the parameter estimation process. An extensive database for your
site is invaluable. Also, experience using both Visual MODFLOW (including the
MODPATH and MT3Dxx packages) and WinPEST is essential to accurate parameter
estimation. Once you are familiar with both the site and the Visual MODFLOW
packages you will be able to effectively push your model towards a stable, accurate
and precise solution.

16 PEST Tutorial

Das könnte Ihnen auch gefallen