readCosero | R Documentation |
Read COSERO outputfiles and store them into a list.
readCosero(
qoutput = "./Q_output.txt",
prec = FALSE,
comp = FALSE,
eta = FALSE,
storage = FALSE,
snowmelt = FALSE,
area = NULL,
timestep = NULL,
treat.neg.as.na = TRUE,
...
)
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. |
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
Simon Frey
m3s2mm
read.qobsqsim
data(area)
fpath <- system.file("extdata","Q_output.txt", package = "TigR")
x <- readCosero(qoutput = fpath, area = area)
x <- readCosero(qoutput = fpath)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.