update.parameters: Run the hydrological model COSERO

View source: R/update.parameters.r

update.parametersR Documentation

Run the hydrological model COSERO

Description

Update the paramters of the hydrological model COSERO via a shell command

Usage

update.parameters(
  path,
  saveold = TRUE,
  batchfile = NA,
  parafile = NULL,
  new.parameters,
  show.output = FALSE,
  ...
)

Arguments

path

Path to the executable of COSERO.

saveold

logical. Save the old parameter file?

batchfile

character string. Use a predefined batchfile for updating COSEROs parameters or use the standard setting (see details). In the latter case, set batchfile = NA.

parafile

chracter string. Path to the existing parameter file. If NULL "./input/Parameter_COSERO.par" is assumed.

new.parameters

character string. Path to the file containing the new parameter matrix.

show.output

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

...

Further arguments passed to shell

Details

update.parameters 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 update.parameters 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 excecution.

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

update.parameters(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.