runcosero: Run the hydrological model COSERO

View source: R/runcosero.r

runcoseroR Documentation

Run the hydrological model COSERO

Description

Call the hydrological model COSERO via a shell command

Usage

runcosero(
  path,
  saveold = TRUE,
  batchfile = NA,
  use.statevar = TRUE,
  which.copy = "all",
  show.output = FALSE,
  ...
)

Arguments

path

Path to the executable of COSERO.

saveold

logical. Save an old model run?

batchfile

character string. Use a predefined batchfile for running COSERO or start COSERO with standard settings. In the latter case, set batchfile = NA.

use.statevar

logical. Should COSERO read its statevariables form statevar.dmp within its input dir?

which.copy

chracter string. Which files of the old model run should be saved. Accepts either a vector of filenames or "all".

show.output

logical. Show the console output of COSERO in the console of R?

...

Further arguments passed to shell

Details

runcosero calls a batchfile via the command shell. In this batchfile, COSERO is fed with the necessary user input. The user can provide a batchfile (e.g. with specific commands to COSERO) or let runcosero write the batchfile itself. In the first case, batchfile must not be NA but a path to the user defined batchfile. In the latter case, both the batchfile and the necessary commandsfile are deleted again after the execution.

The user can decide if COSERO should read its state variales from a statevar.dmp file or use standard state variables via the option use.statevar.

path must be set to a full path to the executable of COSERO including the exe itself. If the exe is not specified, "COSERO.exe" is assumed.

Value

Returns nothing to R but executes the model COSERO

Author(s)

Simon Frey

References

Frey, S., and Holzmann, H.: A conceptual, distributed snow redistribution model. Hydrol. Earth Syst. Sci., 19, 4517–4530, doi:10.5194/hess-19-4517-2015 2015

Herrnegger, M., Nachtnebel, H.-P., and Haiden, T.: Evapotranspiration in high alpine catchments – an important part of the water balance!, Hydrol. Res., 43, 460–475, doi:10.2166/nh.2012.132, 2012.

Kling, H., Stanzel, P., Fuchs, M., and Nachtnebel, H.-P.: Performance of the COSERO precipitation-runoff model under nonstationary conditions in basins with different climates, Hydrolog. Sci. J., 60, 1374–1393, doi:10.1080/02626667.2014.959956, 2015

See Also

For reading the output of COSERO see readCosero and read.qobsqsim

Examples

runcosero(path = "C:/COSERO/COSERO.exe", saveold = TRUE, which.copy = "all", show.output = TRUE)

freysimon/TigR documentation built on April 20, 2024, 9:28 p.m.