<< Click to Display Table of Contents >> Repeated model runs |
![]() ![]() ![]() |
Running the modelWe focus on the Windows operating system. Similar functionality is provided by Linux. Or you can write a small program yourself which does the same thing as the following. Suppose that you have stored a series of 100 stochastic fields in model-ready files named field1.dat, field2.dat...field100.dat. Suppose that these respect the format of a file named input_prop.dat which the model expects to read. Of course the model reads other files as well, but these do not relate to the hydraulic properties for which you have generated stochastic realisations. You can place commands that are similar to the following in a batch file. Model output files corresponding to the different stochastic fields are placed into files named output1.dat, output2.dat,...,output100.dat. Here we assume that the model sandwich is run through the batch file model.bat.
PostprocessingAfter the above loop is completed, you must extract numbers that interest you from all of the output files output1.dat, output2.dat, ..., output100.dat and store them in a table that can be imported into a spreadsheet or plotting program for production of plots such as histograms. You can write your own program to do this. Alternatively a utility program named RDMULRES that is provided with PEST can help you with this task. RDMULRES reads multiple output files whose names are identical except for a run index. It reads numbers from these files using instruction files, and collects all results into a single plot-ready file. |
A general waySuppose that you have generated many different sets of parameters using RANDPAR1 or RANDPAR2. Suppose that random parameter sets reside in files named random1.par, random2,par, ..., random100.par. Suppose also that the PEST control file on which random parameter generation was based is named case.pst. Edit case.pst, and set the NOPTMAX variable in the "control data" section of this file to 0. When PEST is run with this NOPTMAX setting, it simply runs the model once and then ceases execution. The PARREP utility is used to insert a random parameter set into this file before PEST is run. Meanwhile, values of model-generated observations that PEST reads from model output files are stored in files case.rec and case.res. (Case.rec is the run record file and case.res is the residuals file.) Case.rec also records the objective function corresponding to each of these parameter sets. Other model outputs that you may be interested in are stored in model-specific files. Let's say that you are particularly interested in file output.dat. The following batch loop can be used to run the model 100 times and store results of interest in files whose indices are built into respective filenames.
Postprocessing of files case*.rec and output*.dat can be accomplished using your own programs, or perhaps the RDMULRES utility that is supplied with PEST. Other useful programs are MULPARTAB, COMFILNME and COMFILNME1. Program MULPARTAB assembles the contents of multiple parameter value files (i.e. PAR files) into a single table. Programs COMFILNME and COMFILNME1 winnow unwanted members from a list of run-indexed files. Using PEST, BEOPEST and PEST_HPIf you start any of these programs using the "/f" switch, then they do not calibrate a model. Instead they run the model many times, using a different set of parameters on each occasion. Parameter sets are stored in a sequence of parameter value files (normally written by RANDPAR programs). PEST, BEOPEST and PEST_HP prompt for the filename base of these files, and for the beginning and end numbers of the sequence. BEOPEST and PEST_HP parallelise these model runs. Model run parameters and outcomes are stored in a "run results file" (or "RRF file"). This is an easy-to-understand text file. It may get rather large on occasions that there are many parameters, many model outputs and many model runs. This file can be postprocessed (for example to extract numbers to plot histograms) using your own programs, or using some of the programs that are discussed on the next page. Programs of the PEST++ suitePESTPP-IES and PESTPP-SWP can undertake a suite of (parallelised) model runs based on random parameter realisations that are stored in a CSV file. This means that they can process random parameter sets that are generated by RANDPAR2. Model outputs are stored in a CSV file where they are readily amenable to statistical analysis. |