Description Usage Arguments Details Value Author(s) See Also Examples
Import WASIM simulation results
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | read.results(record, path = "wasim/output",
ts.length, subcatchments, data.types.prefix =
data.types$prefix, data.types.has_stat =
data.types$has_stat, ending, endings = rep(ending,
NROW(data.types.prefix)), na.values = c("999",
"999.00"), read.files.nr = 1:nrow(data.types),
remove.missing = FALSE)
read.dates(file=NULL,na.strings=c("999", "999.00","-9999.00"),sep="\t", skip=3)
read.observations(filelist, path = "wasim/input", gauge_names = NULL,
date_modelled = NULL, na.strings = c("999", "999.00",
"9999", "9999.00", "9999.000000", "-9999", "-9999.0",
"-9999.00"), sep = "")
|
file |
WASIM output file the date information is read from. If not specified, the function tries to open the first available file from the globaldata.types\$filename. |
record |
subdirectory/ string to be appended to path (eg. for multiple runs, etc.) |
path |
path the output files reside in (no ending slash) |
ts.length |
number of records to be read |
subcatchments |
number of subcatchments (columns) in WASIM-output file (without statistic column) |
data.types.prefix |
prefixes for filenames (better use default) |
data.types.has_stat |
indicator whether files contain an extra column for summary statistics |
ending |
suffix for filenames |
endings |
suffixes for filenames. Use this if endings differ for various files. |
read.files.nr |
numeric vector indicating which entries from data.types.prefix to process |
na.values |
list of strings for indicating nodata values in the WASIM-files |
na.strings |
Strings in input file to be interpreted as nodata (NA) |
sep |
field separator in input file |
remove.missing |
boolean indication whether to remove an entry from the default data.types if a file was not found |
skip |
number of lines to skip from the header |
filelist |
list of input files to be considered |
gauge_names |
names of gauges that should be read (NULL:read all) |
date_modelled |
timespan that will be extracted |
read.results causes error messages: "...line n hasn't m elements..." The global variable data.types\$has\_stat specifies an statistics column in one of the output files where there is none.
"...has length 14 expecting length 15 - filling ..." The global variable data.types\$has\_stat specifies no statistics column in one of the output files where there seems to be one.
date_vec |
vector of POSIX-dates |
Dominik Reusser, Till Francke
1 2 3 4 5 6 7 | unzip(system.file("weisseritz.zip", package="wasim"))
d.datum <- read.dates(file= "weisseritz/qgesww100.txt") # Datumsreihe heisst jetzt d.datum
str(d.datum)
d.wasim.out <- read.results("", "weisseritz",ts.length=21937,subcatchments=2, ending="ww100.txt") # Datensatz heisst jetzt d.wasim.out
str(d.wasim.out)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.