Usage
hydromod(param.values, param.files = "ParamFiles.txt", model.drty = getwd(),
exe.fname, stdout= FALSE, stderr="", verbose = FALSE,
out.FUN, out.FUN.args, gof.FUN, gof.FUN.args=list(),
gof.Ini, gof.Fin, date.fmt = "%Y-%m-%d", obs,
do.png=FALSE, png.fname, width = 1200, height = 600, res=90,
main, leg.cex=1.2, tick.tstep= "auto", lab.tstep= "auto",
lab.fmt=NULL)
Arguments
param.values
numeric vector, a single parameter set used to run the model specified in exe.fname
param.files
character, file name (full path) storing location and names of the files that have to be modified for each parameter. By default param.files="ParamFiles.txt"
model.drty
character, path to the executable file of the model specified in exe.fname
. ALL the files required to run the model have to be located within this directory (input files for the model may be located in a different directory, if properly refer
exe.fname
character, model command line arguments to be entered through a prompted string to execute the user-defined model
stdout, stderr
where output to stdout or stderr should be sent. Possible values are FALSE
(discard output, the default), ""
, to the R console. See system2
By verbose
logical; if TRUE, progress messages are printed to the screen
If verbose=TRUE
, the following messages will appear: i) parameter values for each particle; (ii) model execution; iii) extraction of simulated values; and iv) computation of the g
out.FUN
character, name of a valid R function to read the model outputs and transform them into a (zoo) object to be compared against obs
(e.g., see read.table
,
out.FUN.args
list, arguments to be passed to out.FUN
gof.FUN
character, name of a valid (goodness-of-fit) R function to obtain model performance (e.g., see NSE
, rmse
, etc).
It MUST HAVE -at least- the followin gof.FUN.args
list, arguments additional to sim and obs that need to be passed to gof.FUN
(e.g., see j argument in mNSE
) gof.Ini
OPTIONAL. Character with the starting date used in the goodness-of-fit function
It is used to subset obs
(if necessary), AND to define the time period to compare simulated with observed values
gof.Fin
OPTIONAL. Character with the ending date used in the goodness-of-fit function
It is used to subset obs
(if necessary), AND to define the time period to compare simulated with observed values
date.fmt
character, format in which the dates are stored in Sim.Ini
, Sim.Fin
, gof.Ini
, gof.Fin
, e.g. %Y-%m-%d. See format
in as.Date
obs
(zoo) object with the observed values
do.png
logical indicating whether a PNG image with the comparison between obs
and the best simulated values has to be created
If the hydroGOF package is available, the plot is produced with the g
png.fname
OPTIONAL. Used only when do.png=TRUE
Name of the PNG file to be created within the model.drty
directory. The default value is Obs_vs_Sim.png
width
OPTIONAL. Used only when do.png=TRUE
numeric, width of the output PNG image
height
OPTIONAL. Used only when do.png=TRUE
numeric, height of the output PNG image
res
OPTIONAL. Used only when do.png=TRUE
numeric, resolution of the output PNG image
main
OPTIONAL. Used only when do.png=TRUE
character, representing the main title of the plot comparing observed and simulated values