0% found this document useful (0 votes)
95 views

Gv8 Tutorial Manual-3

The document describes setting up three different groundwater models to simulate the same confined aquifer system with an east-west gradient. Model 1 uses constant head boundaries along the west and east edges. Model 2 surrounds the model grid with constant heads that are then adjusted using gradient fill to achieve the same gradient. Model 3 uses general head boundaries along all edges calibrated to the desired gradient. While the models produce identical results under ambient conditions, their responses to pumping stresses are expected to differ, demonstrating model non-uniqueness.

Uploaded by

Pedro Jara
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

Gv8 Tutorial Manual-3

The document describes setting up three different groundwater models to simulate the same confined aquifer system with an east-west gradient. Model 1 uses constant head boundaries along the west and east edges. Model 2 surrounds the model grid with constant heads that are then adjusted using gradient fill to achieve the same gradient. Model 3 uses general head boundaries along all edges calibrated to the desired gradient. While the models produce identical results under ambient conditions, their responses to pumping stresses are expected to differ, demonstrating model non-uniqueness.

Uploaded by

Pedro Jara
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

We will now take advantage of an undocumented feature in MODFLOW2005 to compute

drawdown from the results of a particular time step just as we did in the mine dewatering
example in the last section. In previous versions of MODFLOW, drawdown was always
computed from the starting heads for the simulation. In the current model, we would like
to compute drawdown from new pumping wells from the results of the steady-state stress
period. To do this, select Model|MODFLOW|Package Options – Output Control tab.
Turn on the option for custom output control and enter 11 for the number of custom
steps.

Groundwater Vistas Version 8 Page 116


Now, select Model|MODFLOW|Custom Output Control. Fill out the table as shown
below. In particular make sure to put a 1 in the first row beneath the heading “Ddn Ref”.
This option places the key word DDREFERENCE in the output control file in the first
time step, which in turn causes MODFLOW to compute drawdown from that first stress
period.

Groundwater Vistas Version 8 Page 117


Because the simulation will have transient stress periods, we need to enter values for
specific storage and specific yield. Select Props|Storage and Props|Property
Values|Database. Enter 1.0e-5 for specific storage and 0.01 for specific yield in bedrock
and 0.1 for specific yield of alluvium, as shown below.

Groundwater Vistas Version 8 Page 118


Now we will enter a new well that will only pump in stress period 2. Select AE|Well and
put the well near row 32, column 85. Pump from layers 1 and 2. Give the well a name,
such as New Well. Uncheck the steady-state flag and then click the transient data
button. Enter a rate of -15,000 m3|d for the second stress period.

Groundwater Vistas Version 8 Page 119


You can now run the model. Click the calculator button and answer yes to create
datasets. After the run, import the results of the last time step (default). Put a check next
to drawdown on the right so that we can view the impact of the new well. Also, put a

Groundwater Vistas Version 8 Page 120


check next to the cell-by-cell flow file (*.cbb) so we can view mass balance information.
After importing results, select Plot|What to Display and change the contour variable
from Head to Drawdown. The drawdown should look like the following (after changing
the contour interval to 2 m).

The drawdown predicted by the model is about 4 to 7 meters at the existing wells. In
many parts of the USA, that would be too much impact to allow the well to operate.
Another issue that often causes problems is the amount of water removed from surface
water.

To display the amount of water removed from the river by this new well, select
Plot|Hydrograph|Mass Balance|Model Summary. The graph below has been modified
to make the river flow a bold line (double-click the graph to modify it). You can see that
about half of the new well pumping comes from the river (bold dashed line is the river
outflow, lighter dashed line above it is the well outflows). Depending upon the amount
of surface flow, that might be too much to allow the well to pump.

Groundwater Vistas Version 8 Page 121


Groundwater Vistas Version 8 Page 122
Effect of Boundary Condition Selection

Introduction
This exercise illustrates how different boundary conditions can be used to create the same
model with the same computed water levels. Three different models will be designed and
the same predictive scenario will be run with each design. You will see that although the
models all produce the same results in an unstressed state, the predictions when the
model includes a pumping stress are all very different. This is one example of model
non-uniqueness. As part of the exercise, you will also learn new tools within
Groundwater Vistas for designing groundwater models.

The model will be a simple confined aquifer with a uniform gradient from east to west. If
this were a real-world study, the model could be thought of as a small piece of a regional
aquifer where there is limited data outside the area of interest and no regional hydrologic
boundaries close to the site. This situation is actually quite common in modeling where
you only have data in a very small part of a much larger system. In that case, the modeler
will often keep the model small and create a design that allows groundwater to flow in
one side of the model and out the other based on an observed flow direction and gradient.
The figure below shows conceptually what is being simulated.

Groundwater Vistas Version 8 Page 123


Model 1: Upgradient and Downgradient Constant Heads

Start by selecting File|New from the Groundwater Vistas menu. Change the number of
columns to 75 and the X and Y spacing to 200 m. The remaining options can be left at
their default settings. This will create a one-layer model with K=100 m|d, aquifer
thickness of 100 m, 50 rows, and 75 columns.

Click OK when you are finished entering the data described above.

In the first version of this model you will add constant head cells on the east and west
sides of the model. The head on the west is 100 m and the head on the east is 110 m.
Start by selecting BCs|Constant Head and then select BCs|Insert|Window or click the
button on the toolbar. Now, move the cursor somewhere inside the upper left
(northwest) cell in the model, hold down the left mouse button, and drag a window so the
end point is inside the lower left (southwest) cell in the model. Release the mouse button
and the following dialog appears.

Groundwater Vistas Version 8 Page 124


Enter a value of 100 m in the dialog in the field labeled “Head at Boundary”, as shown
above. Click OK when you are done. You should now see a line of blue constant head
cells along the western side of the model.

Repeat this procedure along the right (eastern) edge of the model and use a head value of
110 m.

The model should look like the one below.

Groundwater Vistas Version 8 Page 125


Since the aquifer properties are homogeneous the only thing we have to do to complete
the model is give it a root file name (for the MODFLOW input files) and change the
aquifer type to confined. First, select Model|MODFLOW2000|Options. Change the
layer type for layer 1 from 1 (unconfined) to 0 (confined).

Groundwater Vistas Version 8 Page 126


Now, select Model|MODFLOW|Packages and change the root name at the top to
bctest1. Click OK when you are done.

Groundwater Vistas Version 8 Page 127


The model is ready to run. Simply click the calculator button on the toolbar , and
answer Yes to create datasets. Then you can answer No to viewing the error|warning file.
MODFLOW should run very fast. GV will then ask if you want to import results. Select
Yes and click OK to just accept the default results. Select Plot|What to Display and turn
off display of the grid so you can see the contours better. Also, select
Plot|Contour|Parameters (plan) and change the minimum, maximum, and contour
interval to 100, 110, and 1, respectively. You may also need to increase the font size to 8
points. After all that, your model should look like the one below.

Groundwater Vistas Version 8 Page 128


You should see a uniform gradient from west to east, as shown above. Save this model
design using File|Save As and give it a name like BCTEST1.GWV. We will come back
to this model design later.

Model 2: Constant Heads Surrounding the Model


The second model will have constant heads surrounding all sides of the model grid.
While this is not the best approach to creating a model, it is a common design strategy.
Use the procedure from the last model to add another line of constant heads on the north
side of the model and also on the south side. When you are done, you should have blue
cells surrounding your model. Do not worry about the head value you enter for these
constant heads. We will be using a special feature of Groundwater Vistas to apply a
uniform gradient across all constant head cells after you have entered them. Your model
should now look like the one below.

Groundwater Vistas Version 8 Page 129


To achieve the same uniform gradient, you will now use the “Gradient Fill” option in
Groundwater Vistas. Select BCs|Modify|Gradient Fill. Make sure the Fixed Head
Value field says 100. Change the gradient to 0.000675. Leave everthing else at the
default value. The data on this dialog tells Groundwater Vistas that the head value in row
1, column 1 (northwestern-most cell) is 100 m. The gradient is 0.000675 m|m
(dimensionless). The fact that the gradient is positive means that heads increase to the
east. Click OK when you are done.

Groundwater Vistas Version 8 Page 130


Now, if you double-click a constant head cell along the northern or southern boundary,
you will see that the head has been changed from whatever you entered to a new value
that is designed to give you a uniform gradient.

Use File|Save As to save this new model as BCTEST2.GWV. GV will ask if you want
to change root file names. Enter bctest2 for the new modflow root file name.

Now, run the model by clicking the calculator as you did in the first model and import the
results. The water level contours should look exactly as before (see below).

Groundwater Vistas Version 8 Page 131


Just to be sure that we have the same water level contours, you will use another feature of
Vistas that allows you to compare two binary MODFLOW output files. Select Plot|File
Operations|Compare Two Files. Click the browse button next to the “Subtract” field
and go find the first head-save file, which should be called bctest1.hds. This will
probably be located in the c:\gwv8\models directory. Next, click the Browse button next
to the “From” field and find the results of the second run (bctest2.hds). Finally, enter the
file name dif.hds in the “Results in” field. To actually make the comparison, click the
View button. Vistas will then compare each layer and time step in the files to see what
the differences are. It then displays the maximum head difference for each layer and time
step in the window above the file names. If you were successful, that number should be
about 0.01 meters, indicating that the results are very close.

Groundwater Vistas Version 8 Page 132


Model 3: Constant Head and Constant Flux

Make sure that you saved the second run to a file called bctest2.gwv using File|Save As.
Open the first model you created in this session, bctest1.gwv using File|Open. This is the
model with constant heads on the east and west but NOT on the north and south. You
will change the eastern constant head cells to constant flux (wells).

In order to set the appropriate flow rate (flux) in these cells, we need to know what was
computed in the first model. Run that model again and import the results, including the
cell-by-cell flows. To do this, put a check to the right of the *.cbb file on the import
dialog, as shown below.

Groundwater Vistas Version 8 Page 133


Push down the B button on the toolbar to enter Boundary Condition mode. Move the
cursor over one of the constant head cells on the right and the flux rate should be shown
on the status bar as “F=1.351e+03”, which means that the cell is injecting 1,351 m3/d into
the model through the constant head cell. You could also compute this value from the
gradient (0.000675) times the cell width (200 m), times the hydraulic conductivity (100
m|d), times the aquifer thickness (100 m).

Now we will put the constant flux cells in the model. First, delete the constant head cells
on the right (east) by selecting BCs|Constant Head and then BCs|Delete|Window. Drag
a window that encloses the eastern cells and Vistas will delete them. Now, use
BCs|Well. Select BCs|Insert|Window or click the button on the toolbar. Now,
move the cursor somewhere inside the upper right (northeast) cell in the model, hold
down the left mouse button, and drag a window so the end point is inside the lower left
(southeast) cell in the model. Release the mouse button and a well dialog appears.
Change the flow rate from 0.0 to 1351.0.

Select Model|MODFLOW|Packages and rename the root name as bctest3 so that it will
be separate from the previous two runs. Also, use File|Save As and rename the Vistas
file to bctest3.gwv. Now run the model and your screen model should now look like the
one below.

Groundwater Vistas Version 8 Page 134


The red cells on the east are now wells that inject 1,351 m3|d in each cell. Notice that the
contours look exactly like the previous two model simulations. We now have three
models with three different boundary condition designs that all yield the exact same
solution. Which one is right? (Sorry, rhetorical question…)

Predicting Impact from a Well

To test the predictions from these three different models we will add one pumping well in
the center. Select AE|Well and move the cursor to row 25, column 38 and click the left
mouse button. An analytic well dialog is shown on your screen. Enter the flow rate as -
100000.0 (100,000 m3/d) – in MODFLOW a negative flow rate means that the water is
pumped out of the model.

Groundwater Vistas Version 8 Page 135


You should also select Plot|Map and AE Options|Well Options and change the well
size to 200 so you can see it better. Your model should look like the one below. Note
that the contours are still straight lines because we have not rerun the model yet.

Groundwater Vistas Version 8 Page 136


Now, click the calculator button to run the model with the well. After the simulation is
over, import results as before and you should see the cone of depression around the well,
as shown below.

Groundwater Vistas Version 8 Page 137


Now, repeat this with the other 2 models. An easy way to do this is to press the A button
on the toolbar to enter analytic element mode. Click the left mouse button on the well
you added so it turns solid blue. Now press Ctrl-C to copy the well to the clipboard.
Use File|Open to open one of the other 2 models (e.g. bctest1.gwv or bctest2.gwv) and
press Ctrl-V to paste the well into the other model. Run that model and then repeat this
procedure with the 3rd model.

The other two model runs should look like the ones below.

Groundwater Vistas Version 8 Page 138


Groundwater Vistas Version 8 Page 139
You can see that the results are quite different. The largest cone of depression (largest
amount of drawdown) is for the model that has the one boundary set to a constant flux.
This happens because the model cannot allow any extra water to enter the model domain
in response to pumping. The next largest cone of depression is with the first model that
had 2 sides of the model set to constant heads. The least amount of drawdown was for
the model that has all sides as constant head. The latter does not allow the head to
change on the model boundary and so limits the amount of impact from the well by
supplying additional water to the model from all sides. Which one do you think is the
most realistic approach?

Groundwater Vistas Version 8 Page 140


Model Calibration in Groundwater Vistas

Introduction
The following tutorial focuses on Groundwater Vistas’ tools for model calibration and uses a synthetic
model to illustrate the importing and manipulation of calibration targets and using automated sensitivity
analysis. Defining a set of calibration targets is a fundamental first step in applying any inverse model,
such as Pest. Groundwater Vistas has several different types of targets, including head, drawdown, flux,
concentration, gradient (magnitude & direction), and subsidence. In this simple example, we will import
head targets into a model and explore the different ways of displaying and manipulating targets in
preparation for using Pest.
To start, open the model called c:\gwv8\tutorial\CalEx0.gwv. Run the model by clicking the calculator
button and import the results after the run is finished. Your screen should look like the one below:

Preparing for Calibration


The first step in preparing for automated sensitivity analysis and Pest calibration runs is to make sure that
the model will run reliably when parameters are changed. A good way of testing this is to set up an
automated sensitivity analysis in Groundwater Vistas. There are two things that have been added to
Groundwater Vistas’ version of MODFLOW that are not standard but assist in stabilizing runs. The first is
to continue model simulations even if the model has not converged. While this can lead to bogus

Groundwater Vistas Version 8 Page 141


simulations, it will allow Pest to keep going. To activate this option, choose Model|MODFLOW|Package
Options – BASIC tab, as shown below.

The option is called “Continue MODFLOW Simulation Even if Convergence Not Achieved”. You should
make a habit of always turning this on when using automated sensitivity analysis and Pest.
The second option that helps with slightly unstable model simulations is related to the PCG2 solver. The
PCG2 solver has a bad habit of often getting to the end of the run and then just slightly oscillating between
outer iterations without ever converging fully. We added an option to stop iterating if the two convergence
criteria (head and residual) are met in N successive outer iterations. Usually 5 to 10 is a good number. If

Groundwater Vistas Version 8 Page 142


you rely on this feature, make sure that the mass balance error is low (< 1 %). As with the previous option,
this is not a USGS standard option. To activate this switch, use Model|MODFLOW|Solver Options –
PCG2 tab. It is the last field on the property sheet.

Adding Calibration Targets


Calibration targets can be added to the model manually by selecting AE|Target and left-clicking where you

want the target to go. You can also click the button on the toolbar and then left-click to add the target
in the same manner. Usually, however, there are far too many targets to insert them all manually. The
more common way of adding targets is either to import from a text file (e.g. comma-delimited Excel
spreadsheet) or from a GIS shapefile. We will illustrate each method.
Start by importing a set of targets from a text file. The file is called CalEx0_targets.csv and should be in
the gwv8\tutorial directory. You can open this file in Excel to view the contents.

Groundwater Vistas Version 8 Page 143


There are 16 targets with names, coordinates, target head values, layers, and weights. This is the generally
the minimum information to define a target in Vistas, although layer and weight can be omitted. If layer is
omitted, then the targets are imported into the current layer. Weights are assigned a value of 1.0 if they are
not in the file.
Import this file by selecting AE|Import|Target Text File and browse to find this file. Then enter the
column number of the data next to the corresponding label on this dialog. For example, Name is in column
1, X is in column 2, etc. You also need to enter a 1 for number of lines to skip. By default Vistas assumes
that the X and Y coordinates are “site coordinates”. That is, they are the same coordinates as your base
map (see first option on the dialog below). Your dialog should look like the one below.

Groundwater Vistas Version 8 Page 144


Click OK and Vistas should report that 16 targets were imported. If you do not get that number imported
then there was something wrong on the import dialog above. You can confirm that you have 16 head
targets by selecting Model|Model Information. This is a handy place to get a summary of all boundary
conditions and analytic elements in the model.
Another option for adding targets is from a shapefile. The shapefile was invented by ESRI for ArcView
and ArcInfo (now ArcGIS) as a standard file type for displaying and manipulating spatial data. They can
be composed of either points, lines, or polygons. A shapefile is actually a collection of files. Groundwater
Vistas uses 3 of these files: (1) the *.shp file contains the coordinates of each entity, (2) the *.dbf file
contains the attributes of each entity (e.g. Name, target head, etc.), and (3) the *.shx file is tells which shape
goes with which item in the attribute database. Groundwater Vistas further assumes that the coordinates
are the same as your base map.
To import targets from a shapefile, use AE|Import|Shapefile. Browse to find the file CalEx0_targets.shp
and change the element type from Well to Target.

Groundwater Vistas Version 8 Page 145


Groundwater Vistas will now open the database file and pull out the field names. The following dialog is
displayed. Your job is to select the database field that corresponds to the data types needed for the target.
If a particular data type is not in the database, then just leave the field as “Not in Database”. Fill out the
dialog as follows, making sure to check the option that the layer elevation field contains layer numbers:

Groundwater Vistas Version 8 Page 146


Note that you never tell GV which field contains coordinates. This is because the coordinates are obtained
automatically from the shapefile. Click OK when you are done and Groundwater Vistas should again
report that 16 targets were imported.

You will now see that a problem has occurred. Your targets have disappeared. This happened because we
imported the targets twice, once from the text file and once from the shapefile. Groundwater Vistas does
not delete duplicate targets, but rather simply keeps adding them to the model as you import them. If two
targets lie identically at the same location, they essentially “white out” each other and nothing is displayed.

This is a rather common problem, which is why we set up this computer session the way we did. You can
rectify the problem in a couple of ways. Generally the easiest approach is to delete all targets and import
again. This is done by selecting Edit|Select All|Targets followed by Edit|Delete (or just hit the Del key).
Another approach since we only have a few targets is to select Edit|Analytic Element List and click on the
duplicate targets and hit the Delete button, as shown below.

Pick a method outlined above to get back to one set of 16 calibration targets.

Groundwater Vistas Version 8 Page 147


Calibration Statistics and Plots
The reason for using calibration targets is to be able to generate statistics and plots that show how well the
model matches reality. The first thing you usually do is select Plot|Calibration|Statistics-Plots. If you do
that now, you will get an error message:

Groundwater Vistas computes the residual (error) at each target when the results are imported. If you
import targets after importing results, the residuals have not been computed. Simply select Plot|Import
Results and click OK to update the target calculations.

There are many ways of analyzing residuals at target locations. The most common is to get the statistical
summary and make basic charts. This is done through Plot|Calibration|Statistics-Plots. Do that now and
then click the statistics button. You should get a summary that looks like the following:

If you want a spreadsheet of the details for these targets, click Close and then click the Export button. The
file that is exported is a comma-delimited file you can open in Excel. Various plots can also be created

Groundwater Vistas Version 8 Page 148


such as computed versus measured target values, computed versus residual, and a cumulative sum of
squared residuals plot. The latter is very useful when using Pest because a few very large residuals can
cause convergence problems in Pest. If you create the cumulative sum of squares plot now you will see the
following:

This shows that almost half of the total sum of squared errors (objective function in Pest) is controlled by
just 4 targets and 20% of the sum of squares is the one worst target (558 ft2 for target 1 in the chart above).
This is not a significant problem early in the calibration. However, after you have been working on the
calibration this might be an indication that there are a few targets (maybe just 1 target) that is a significant
part of the overall objective function. In that case, you may consider using a weight less than 1.0 to remove
any adverse influence of this one target on the calibration. Remember that Pest is trying to lower the
overall sum of squared residuals. If just a couple of targets are controlling that value, then Pest will be
spending most of its effort on those few targets.

Other common displays you can create for the target set is to post the residual at each target and/or draw a
residual circle at each target. This is done using Plot|Calibration|Post Residuals and
Plot|Calibration|Post Residual Circles (or just use Plot|What to Display). The options for how these
postings are created are controlled using Plot|Calibration|Options. Try posting residuals and residual
circles for the current model. Your plot may look something like the one shown below.

Groundwater Vistas Version 8 Page 149


The colors used for residuals and residual circles are blue for positive residuals (model-computed values
are too low) and red for negative residuals (model-computed values are too high). In this uncalibrated
model, all targets are too low in the model results. You can use the options menu described above to
change those colors.

Editing Calibration Targets


Targets are edited in Vistas by either double-clicking individual targets (make sure the “A” button is
pushed down on the toolbar) or using the AE|Modify|Targets menu.

Groundwater Vistas Version 8 Page 150


You can convert steadystate targets to transient or vice versa. Note that if there is more than one stress
period and|or time step, even though the run is steadystate, all targets must be transient. The “Target
Thinning” option is used when you have highly clustered targets. This option can automatically delete
targets based on number per cell, distance, etc.

Calibration Target Report


Another type of export for target residuals is accessed from Reports|Calibration|Target Residuals. This
report offers more options than the standard export under Plot|Calibration|Statistics-Plots. The target
residuals report options are shown below.

Groundwater Vistas Version 8 Page 151


These options give you a lot of flexibility in creating residual tables and statistics and looking for problems
such as targets in dry cells or extreme target values. Try creating a report for this model and open the file
in Excel.

Groundwater Vistas Version 8 Page 152


Automated Sensitivity Analysis
The purpose of the automated sensitivity analysis in Groundwater Vistas is to explicitly show the effect of
small changes to model parameters on calibration statistics. Curves are plotted for each parameter tested
and these curves help you decide which parameter to adjust and by how much. It is a computationally
intensive operation and not as efficient as a Pest run. However, it does have the advantage of confirming
model stability and provides good information on overall parameter sensitivity. We believe it is a good
precursor to a Pest run.
The easiest way to run an automated sensitivity analysis through Groundwater Vistas is to use the script file
creation routines. Select Model|Auto Sensitivity|Options.
Change the parameter to Kx=Ky at the top of the dialog and confirm that the zone is set to 1. Note that
when changing the parameter type at the top, do not type in the parameter name – simply use the dropdown
list of names provided. In this case, Kx=Ky means that we are adjusting both Kx and Ky by the same
amount (i.e. isotropic conditions).
Confirm that the number of multipliers to 11. Click the multipliers button and confirm that the multipliers
are 0.5, 0.6, 0.7. 0.8, 0.9, 1.0, 1.1, 1.3, 1.5, 1.7, 2.0.
Once you have defined the first parameter, click the New Script button and put the script file in
c:\gwv8\tutorial\work. Call it sens1.in. Note that GV automatically will change the output file name to
sens1.in.out so you know which automatic sensitivity analysis results corresponds to which input file.
After giving the file name, GV will prompt for a range of zones to use. This is a quick way of adding many
consecutive zones without having to do it manually. Enter 1 for the first zone and 2 for the second zone.
We have two K zones of interest in this model.

Now change the property type from Kx=Ky to Kz.


Click the Add to Script button and enter the zone range of 1 to 2 again.
You now have 4 parameters in the script file, Kx1, Kx2, Kz1, and Kz2.
Now change the parameter type to Drain Conductance.
Click the Add to Script button again and enter a range of drain reaches from 0 to 1.
You now are done creating the script file unless you want to add recharge. To look at the script file, click
the Edit Script button. The file should look like the following one:

Groundwater Vistas Version 8 Page 153


The format of the script file is documented in the Groundwater Vistas manual. The first number is the
parameter number (0=Kx, 1=Kz, etc.). The second number is the zone or boundary reach and the third
number is the number of simulations to run. Following the parameter definition line are the multipliers in
order from lowest to highest.
To run the script file, click the Run from script file button. Be sure that the script output file is located in
the same directory as the input file (normally it will be because GV will automatically put it in the right
location of you use the “New Script” button. In this case, it should be but if you put it somewhere else,
change it now.

Groundwater Vistas Version 8 Page 154


Now, start the sensitivity analysis by selecting Model|Auto Sensitivity|Run Analysis. The model will run
66 times (6 parameters x 11 runs per parameter), which should not be too long since this is a relatively
simple model.
When the model is done running, you will be asked if you want to create a plot. Select Yes, and then just
click OK on the next dialog that prompts for the file name. GV puts the results of the analysis in the script
output file (see dialog above – sens1.in.out). This is a comma-delimited file that you can view in a text
editor or in Excel. Next click OK on the dialog asking which statistic to plot. Although you may choose
from a variety of statistics, the sum of squared errors is the best one to use. Your first plot should look like
the following:

Groundwater Vistas Version 8 Page 155


This curve shows that reducing Kx1 by a factor of 0.5 would substantially reduce the sum of squared errors
and therefore improve the quality of the calibration. The initial sum of squared residuals (multiplier = 1.0)
was about 2,790 in this case. If you look at the Kx1 curve above, you can see that at a multiplier of 0.5, the
sum of squared residuals drops to 525, a substantial improvement. The trick to reading this graph is to look
for the curve that hits the lowest point on the Y-axis (sum of squared residuals). A low sum of squares
equates to a better model, assuming the parameter change makes sense. Once you find the curve that has
the lowest sum of squared residuals, look at the parameter type and multiplier. If that value seems to be
justified, change the parameter in Groundwater Vistas and run the model again.
Make that change now by selecting Props|Property Values|Database.
Multiply the Kx and Ky values for zone 1 by 0.5 and enter those values in the database.

Groundwater Vistas Version 8 Page 156


After making the change, run the model one time to confirm the results and make another pass through the
automatic sensitivity analysis.
Repeat this analysis 4 more times. If you want the computer to do all the work for you, select Model|Auto
Sensitivity|Options and turn on the Super script option at the bottom. In Super script runs, GV decides
which parameter to change, makes that change, and runs another script analysis. Change the number of
super script runs from 5 to 4 and try it. In this type of analysis, you don’t get a graph but rather a summary
of which parameters were changed and by how much. The changes are permanent in your model so if you
don’t like what happened, you can use the super script output file to go back and reset to the original
values.
If you make 5 sets of auto-sensitivity runs (your initial one plus 4 more), you should be able to get the sum
of squared errors down to about 128 and the calibration should look reasonably good. If you want to
compare your progress to the theoretically “correct” answer, here are the four additional runs.
In run 2, the Kx1 curve now reaches a minimum value at a multiplier of 0.7. This brings the sum of
squared residuals from 525 to about 293. If you are unsure of the exact multiplier, just click on the Kx1 tab
at the bottom of the graph window. This will show a spreadsheet of multiplier versus sum of squared
residuals so you can see the raw data that went into the graph for this parameter. Change Kx and Ky in
zone 1 from 2.5 to 1.75.

Groundwater Vistas Version 8 Page 157


In run 3, the results are starting to look like they are not getting much better. This is partially because of
the scaling on the Y-axis where there are some large sum of squared residual values. The graph right after
the run looks like this.

In order to better see what is going on, we need to change the scaling of the Y-axis. Right click the graph
and choose properties. On the Y-axis tab, change the maximum Y to 500. Now the graph is easier to read,
as shown below.

Groundwater Vistas Version 8 Page 158


It is easier to see now that multiplying Kx2 by 2.0 will lower the sum of squared residuals from 293 to
about 233. Go to the property database and make that change to both Kx and Ky.
The results of run 4 need to be scaled as in run 3. After doing that, it is clear that multiplying Kz in Zone 2
by 0.5 will reduce the sum of squared down to about 178. Go to the database and change Kz2 to 0.005.

Groundwater Vistas Version 8 Page 159


After run 5, the results are like run 4, as shown below. Reducing Kz2 by another factor of 0.5 will lower
the sum of squared residuals to about 123.

In summary, we made 5 sets of 66 runs each. After each set, we changed one parameter value and lowered
our sum of squared residuals substantially from 2,790 to about 122. In addition, the process is logical and
can be easily explained and documented.

Introduction to PEST
The following tutorial continues on from the previous session and introduces you to the Pest inverse model.
You will start with a steadystate calibration and then add a transient simulation.
Select File|Open and find the file CalEx1.gwv. Click the calculator button to run the model one time just
to make sure all files are up to date.
PEST has its own set of menus under Model|Pest.
First select Model|Pest|Options - Basic Options. This sets the main options for the Pest run.
Put a check in the option to put the BCF Package arrays in a separate file (“Write arrays as external files”).
This is technically not necessary for MODFLOW2000/2005 with the LPF Package but it is a good habit to
get into as many times you will need to do this with PEST and it does not hurt to do it even if it is not
necessary.
Put a check in the option to run models without screen output (this allows you to see the Pest screen
output). Finally, put a check in the option to “Use Command-line versions”. The latter will run Pest
without the ESI versions of MODFLOW flashing up a window each time the model is run.
Also, put a check next to “Use Singular Value Decomposition (SVD)”, check the next option (Use NPar),
and enter 5.0e-7 for Eigenvalue Threshold. These 3 options should be used each time you use PEST. SVD
allows PEST to automatically exclude insensitive parameters from the estimation. Your dialog should look
like the following:

Groundwater Vistas Version 8 Page 160


Next set up the Pest parameters by selecting Model|Pest|Parameters.
Change the first one to Kx Zone Number
Enter zone 1 in the field to the right of the parameter name.
Set the transformation to “log” and the limit type to “factor”.
Repeat this for Kx in Zone 2, Kz in Zone 1, and Kz in Zone 2.

Groundwater Vistas Version 8 Page 161


An easier way to do this is to use the Parameter Setup button. If you use this approach, you would enter
the following for Kx zones:

Note that by checking the option that the minimum and maximum values are multipliers you don’t need to
remember what the current values are in these zones. Also, for Kx, Kz, and storage, you can check the
“Add All Zones” option and Vistas will put all K zones in the parameter spreadsheet. Note, however, if
you do that for this problem you need to uncheck the “Use” column for zone 3. Zone 3 contains no targets
and is very insensitive so we can exclude it from the calibration.
We will also be estimating drain conductance. Add Drain conductance in reach 0 and Drain conductance in
Reach 1. Use the “log” and “factor” options for all of them. Also, make sure to increase the Parameter
Upper Bound for the drain conductances to 1e+06.

Groundwater Vistas Version 8 Page 162


Now, we will create the files necessary to run PEST.
First, select Model|MODFLOW2005|Create Datasets to write out the external arrays for the BCF
package.
Then select Model|Pest|Create Datasets.
It is always a good idea with PEST to run the PESTCHEK utility. PESTCHEK looks at your PEST input
file (root.pst) to see if there are any problems. To run it from GV, select Model|Pest|Run Pestchek. GV
then runs pestchek and puts the screen output into a text file and then displays the text file. You should see
no errors but two warnings. (The warnings are because gradient targets are turned on but there are no
gradient targets in your model. This won’t hurt anything but you can turn them off by selecting
Model|Pest|Options – Targets tab).
You can now run Pest by selecting Model|Pest|Run Pest. Pest will start by running the model with the
current parameter values. Pest will then display the starting sum of squared residuals (phi) and tell you
how many times it will run the model during the first iteration, as shown below.

Groundwater Vistas Version 8 Page 163


The starting phi (2788.9 ft2 in this case) should closely match the value you get by running the model one
time and selecting Plot|Calibration|Stats. If the Pest phi does not match the sum of squared residuals
reported by Vistas, then something is wrong.
Now Pest will run the model one time for each parameter (6 times in this example). After these first 6 runs,
Pest will estimate a new set of parameters using the starting Lambda value. Next, Pest will test multiple
Lambda values to see if it can do a better job with more Lambda values.

In this first iteration, Pest used the default Lambda value and reduced phi to 1,643. It then reduced Lambda
from 10 to 3.1623 and phi actually went up. PEST then tried a lambda of 31.623 and phi dropped to
135.94. This was such a huge step (less than 0.3 of starting phi) that it moves on to the next iteration (Note
that you can control that 0.3 value under the various Pest options).
After a few iterations, the phi has dropped to the level where it is not changing much between iterations.
Pest will now start running the model twice for each parameter. This was done because the “switch” option

Groundwater Vistas Version 8 Page 164


is the default option that Vistas uses. It is generally a good idea to use this approach because it is very
common to make good progress early in the Pest run and then as the model gets closer to the best fit, the
change in phi slows.

So in this example, the number of model runs eventually jumps from 6 runs to 12 runs. Phi has dropped
down to less than 1, which is several orders of magnitude better than the initial phi. When this happens,
you know you are close to a solution.
Eventually Pest will get to a point where phi is not changing very much at all. Pest will then report it is
done and run the model one last time with the best estimates. This is handy because you can then simply
choose Plot|Import Results in Vistas to see the calibrated head field.
Import results after your Pest run and your screen should look like the one below. Note that the residuals
posted next to each target are very low numbers. You should also check the calibration statistics to confirm
that your sum of squared residuals is close to the final Pest value (0.6 in this case).

Groundwater Vistas Version 8 Page 165


You can also view the Pest text output when you are done by selecting Model|Pest|View Main Output. If
you plot the final sensitivities for the Pest run (Plot|Calibration|Pest|Final Sensitivities), you can see that
Kx in zone 1 is the most sensitive parameter and drain reach zero is the lowest in terms of sensitivity.

Groundwater Vistas Version 8 Page 166


In the past we also used MODFLOW2000 in this calibration exercise and found that MODFLOW2000
cannot get nearly as good a fit as Pest unless Drain reach 0 is turned off as a parameter. This is an
interesting result because MODFLOW2000 and PEST compute sensitivities in a different way. Pest uses
perturbation to compute parameter sensitivities. That is, it changes each parameter slightly and then
compares the change in error at each target to the base case. MODFLOW2000 computes sensitivities
analytically which the authors at the USGS claim yields much more accurate results. Obviously this is not
the whole story since Pest is so much better, at least in this case.
Before we do anything else, use File|Save As and give this version of the model a new name, such as
CalEx1_PestSetup.gwv.
If you like the results of the Pest calibration run, the next step is to take the final parameter estimates from
Pest, enter those in the current model, and run it again. Groundwater Vistas offers a simple way of doing
this. Simply select Model|Pest|Update Parameters and answer Yes to the next prompt. Before doing
anything else, it is a good time to save the model under a new name (e.g. CalEx1_PestResults.gwv) using
File|Save As. It is good practice to save at least two versions of each calibration run. One is the setup of
the run which we saved in the previous paragraph and the second is the result, which we save now. That
way if you ever want to go back and reproduce what you did, you can do that or you can test the
effectiveness of other Pest options and rerun it.

Groundwater Vistas Version 8 Page 167


Transient Calibration with PEST
Calibrating a transient model with PEST is exactly the same procedure as for a steadystate model. The
only real difference is definition of calibration targets and the fact that you have some additional
parameters that can be calibrated (e.g. storage and specific yield). Start by opening the result of the
previous calibration where you updated parameters. If you did not save it, you can use the one called
Calex1_pest_answer.gwv from the tutorial folder.
In this example, we will add a pumping well to simulate a pumping test and recovery period. Select
Model|MODFLOW|Package options and increase the number of stress periods from 1 to 3. This is the
easiest way to add additional stress periods to the end of a run.

When you click OK, GV8 will start to prompt you for additional information. First you are asked if you
want to copy recharge to the new stress periods. Answer Yes to this one. Next is the same prompt for ET.
Answer Yes to that one as well. Next you are asked to set up new stress periods. Answer Yes to that one.

Groundwater Vistas Version 8 Page 168


Now you are shown the stress period setup spreadsheet. Change the length of the first stress period to 1
and make the other 2 periods 30 days each with 15 time steps.

The next prompt asks to check the period types (steadstate or transient). Click OK.

Make stress periods 2 and 3 transient by entering a 1 in the spreadsheet.

Groundwater Vistas Version 8 Page 169


Add an analytic element well in layer 2. First go to layer 2. Then select AE|Well and click on row 44,
column 45. Turn off the steadystate pumping option and enter a name of Well1.

Click the Transient Data button. Enter a pumping rate of -10,000.0 for stress period 2, as shown below.

Since only stress period 2 is defined in the table above, the well will only pump in that stress period.

Groundwater Vistas Version 8 Page 170


Now check the storage properties of this model. Often when a steadystate model is created, the default
storage properties are not very realistic. Select Props|Storage and then Props|Property Values|Database.
The default values for specific storage (Ss) and specific yield (Sy) are both 0.01. The Ss value is too large
and the Sy value is likely too low. Enter a specific storage (Ss) value of 0.0001 and a specific yield (Sy) of
0.3.

The next step is to define calibration targets. We already have steadystate targets in this model. To
continue using these, they need to be converted to transient. Even though they represent the first stress
period that is steadystate, whenever a model contains more than one time step, all targets must be transient.
The easy way to make this change is to use AE|Modofy|Targets|Steadystate to Transient. Enter a time
value of 1.0, which is the length of the steadystate stress period.

We have 4 new monitoring wells that were installed for this test. These will be imported using a relational
database approach where one file contains the physical characteristics of the target wells (x,y,layer, etc) and
the second file contains the date and water level measurements. The key in this type of import is that the
same well names are used on both files. This name is used to link the two types of data.

Groundwater Vistas Version 8 Page 171


Select AE|Import|Target Text File. Find the file called transient_target_wells.csv in the gwv8 tutorial
folder. This file has name in column 1, x in column 2, y in column 3, and layer in column 4. Also turn on
the option that the file contains transient targets and to skip one line.

At the bottom of the dialog turn ON the option that says “Transient Data Contained in Separate File” and
click the browse button. Now find the file called transient_waterlevels.csv. This file has well name in
column 1, date in column 2, and water level in column 3.

Groundwater Vistas Version 8 Page 172


Unlike most other imports in GV8 that use stress period numbers or elpased time, this import uses dates.
Thus, you need to define the beginning date and time of the simulation. In this case, set the starting year to
2010, month to 6 (June), and day to 1.
You should see that 4 new targets have been imported. Run the model and check the calibration statistics
(Plot|Calibration|Statistics). The calibration statistics should look like the following.

Groundwater Vistas Version 8 Page 173


Now, make a plot of observed vs simulated water levels. What you see is some data on the ideal 45-degree
line and other data are aligned in curves off the ideal line. The data that show a good fit are from the
steadystate period and the others are the transient data. This is a typical first cut at a transient run.

We will now calibrate this model with Pest. Since we already calibrated the hydraulic conductivity values
in the steadystate calibration, we can focus on the storage properties in this new transient period. Select
Model|Pest|Parameters. There should be parameters in the spreadsheet left over from the steadystate
calibration. Click the Clear All Parameters button. Then enter two new parameters for Storage in zone 1
and Sy in zone 1. The range in Ss should be 1.0e-6 to 0.001. The range on Sy should be 0.01 to 0.4.

Run pest as in the previous examples. It should run just a few iterations and then converge on a low sum of
squared residuals. After Pest is finished, import results (Plot|Import Results). Look at hydrographs for the
4 new targets (OW1, OW2, OW3, OW4). One is shown below as an example. These graphs show an
excellent match with the observed data.

Groundwater Vistas Version 8 Page 174


To view the new estimates for the parameters, select Model|Pest|View Files|Parameters. The new Ss value
is 1.9e-5 and the new Sy is 0.22.

You can see from this example that there is nothing very new about using Pest for transient models. The
steps are all the same. The main difference is in the definition of targets.

Groundwater Vistas Version 8 Page 175

You might also like