Description Usage Arguments Details Value Author(s) References See Also Examples
Create a PEST control file as well as several batch files necessary to run COSERO in PEST mode (see details).
1 2 3 4 5 6 |
NB |
A numeric giving the number of the subbasin that will be optimized |
upriverNB |
A numeric or a numerical vector (see Details) |
wd |
A character string giving the working directory |
updatesofar |
Logical. Automatically update the baseparameters from a previous PEST run (not in use) |
transferfile |
A string pointing towards a transfermatrix |
placeholders |
A string pointing towards a file containing the PEST-wise names of the parameters to be optimized (see details) |
tempchek |
A string pointing towards the executable tempchek.exe (see details) |
pestgen |
A string pointing towards a the executable pestgen.exe (see details) |
file_in |
A string pointing towards a file containing the factors for factoval |
file_out |
A string pointing towards the outputfile for factoval |
file_objfunc |
A string pointing towards the outputfile for kge_nse |
lb |
A numeric giving the lower bound of the parameter range |
ub |
A numeric giving the upper bound of the parameter range |
This function relies on the presence of PEST (Doherty 2016) being installed on the computer running windows. PEST can be downloaded from http://www.pesthomepage.org/Downloads.php. More precisely it relies on the two executables “tempchek.exe” and “pestgen.exe”. See Doherty 2016 for more details about the use of these executables.
prepest reads a table “placeholders” containing the PEST-wise parameter names of the parameters that can be altered (note that this file can hold parameter names of the whole catchment, not only of the subbasin that will be optimized by PEST). It reads in a transfer table, too. That table contains the base parameters of the total catchment (see factoval). prepest automatically selects the subbasin (NB) and the subbasins upstream (upriverNB) and only the respective parameters to PEST.
It then creates a PEST control file named “cosero_subbasinNB.pst”, where NB represents the number of the subbasin that will be optimized.
Further, it will create a batchfile that will call COSERO and let the model read in the table with altered parameter values into a new parameter file. Then it calls COSERO again and perform a model run with the new parameter set.
pretest also creates a second batchfile for post processing. This second batchfile will call R and do some post processing like calculating the Kling-Gupta-Model efficiency via calling kge_nse.
The filenames may be given in relative or absolute paths. If relative, they are extended into absolute paths using the path given by wd. An exception is file_objfunc. That is extended by "output\" because it normally is written to the output directory of COSERO.
Nothing is returned to R.
Simon Frey
Doherty, J., 2015. Calibration and Uncertainty Analysis for Complex Environmental Models. Watermark Numerical Computing, Brisbane, Australia. ISBN: 978-0-9943786-0-6.
Doherty, J., 2016, PEST, Model-independent parameter estimation—User manual (6th ed.): Brisbane, Australia, Watermark Numerical Computing.
http://www.pesthomepage.org/Home.php
kge_nse factoval postpest
1 | ####
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.