Usage
hydromod(param.values, param.files = "ParamFiles.txt", model.drty = getwd(),
exe.fname = "./swat2005.out", 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, parameter values that will be used in the model
param.files
character, file name (full path) storing location and names of the files that have to be modified for each parameter
model.drty
character, path storing the executable file of the model and ALL the input files required for the simulation
exe.fname
character, name and extension of the file executing the 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
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
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
gof.FUN.args
list, arguments to be passed to gof.FUN
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 if a png image with the results of the ggof.FUN
function has to be produced
png.fname
OPTIONAL. Used only when do.png=TRUE
Name of the PNG file to be produced. The default values is Obs_vs_Sim.png, within the model.drty
directory
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