readCosero: Reading COSERO output files

View source: R/readcosero.r

readCoseroR Documentation

Reading COSERO output files

Description

Read COSERO outputfiles and store them into a list.

Usage

readCosero(
  qoutput = "./Q_output.txt",
  prec = FALSE,
  comp = FALSE,
  eta = FALSE,
  storage = FALSE,
  snowmelt = FALSE,
  area = NULL,
  timestep = NULL,
  treat.neg.as.na = TRUE,
  ...
)

Arguments

qoutput

character string. Pointing towards the file "Q_output.txt"

prec

logical or character string. Should precipitation data be read in? Maybe a path to the corresponding file.

comp

logical or character string. Should data about the composition of runoff be read in? Maybe a path to the corresponding file.

eta

logical or character string. Should data about evapotranspiration be read in? Maybe a path to the corresponding file.

storage

logical or character string. Should storage data be read in? Maybe a path to the corresponding file.

snowmelt

logical or character string. Should snow data be read in? Maybe a path to the corresponding file.

area

numeric. Area of the subbasin(s).

timestep

numeric. Timestep of the data.

treat.neg.as.na

logical. Should negative observed runoff values be treated as NA?

...

Additional arguments passed to read.table from other methods.

Details

Reading the file Q_output.txt.

The function automatically searches for the file containing data about precipitation, runoff composition, eta, storage or snowmelt if the respective arguments are set TRUE. It is also possible to specify the path to the respective file directly. If the file cannot be found, it is skipped an a warning is returned. Note that those file are NOT written by COSERO by default. Use OUTCONTROL = 1 or 2 in the defaults file of COSERO to activate writing of them. They are given in mm. To compare them to runoff, be adviced that runoff should be transformed into mm, too. This, however, can only be done if area is given. It is done via m3s2mm. The argument timestep may be provided. If NULL the function will try to gather it from the data.

For reading qobs_qsim.txt see read.qobsqsim

Author(s)

Simon Frey

See Also

m3s2mm

read.qobsqsim

Examples

data(area)
fpath <- system.file("extdata","Q_output.txt", package = "TigR")
x <- readCosero(qoutput = fpath, area = area)
x <- readCosero(qoutput = fpath)

freysimon/TigR documentation built on July 26, 2024, 1:28 a.m.