readDailySeries: Read daily time series from various hydrometeorological data...

Description Usage Arguments Details Value Warning Author(s) Examples

View source: R/readDailySeries.R

Description

The following data providers are supported:

BAFU (Switzerland)
BMLFUW (Austria)
GRDC (Germany)
LFUB (Germany)
LUBW (Germany)
MAPAMA (Spain)
MEDDE (France)
METSW (Switzerland)

Usage

1
2
readDailySeries(file = NULL, id = NULL, provider = NULL,
                series = TRUE, vars = NULL)

Arguments

file

string. The full file name (can also be a regular expression).

id

number of string. Id of the corresponding gauge station as specified by the provider.

provider

string. The abbreviated name of the data provider as specified in the table above.

series

logical. Return the series? Otherwise, name, id, and file name are returned.

vars

character vector. The variables' column names in file. Currently only used for METSW.

Details

Value

Matrix with the daily dates in the row names; streamflow data is labelled 'qd'. If series=FALSE a list that contains some information about the file.

Warning

This function has been successfully used over the past few years, however, it will fail as soon as the data providers change their file structures or header formats.

Author(s)

Simon S

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## Not run: 
## BAFU
f <- paste0(ddir,'AllDar_Q_2490_Tagesmittel.asc')
d <- readDailySeries(file=f,id='2490',provider='BAFU')

## BMLFUW
f <- paste0(ddir,'200451.txt')
d <- readDailySeries(file=f,id='200451',provider='BMLFUW')

## GRDC
f <- paste0(ddir,'6731510.day')
d <- readDailySeries(file=f,id='6731510',provider='GRDC')

## LFUB
f <- paste0(ddir,'21516505.csv')
d <- readDailySeries(file=f,id='21516505',provider='LFUB')

## LUBW
f <- paste0(ddir,'0076275-Q.txt')
d <- readDailySeries(file=f,id='0076275',provider='LUBW')

## MAPAMA
f <- paste0(ddir,'4904.xml')
d <- readDailySeries(file=f,id='4904',provider='MAPAMA')

## MEDDE
f <- paste0(ddir,'H5920010.csv')
d <- readDailySeries(file=f,id='H5920010',provider='MEDDE')

## METSW
f <- paste0(ddir,'order36881.zip')
d <- readDailySeries(file=f,id='WIN',provider='METSW',
                     vars=c('rre150d0','tre200d0'))
## End(Not run)

hydro-giub/hydroBE documentation built on Sept. 20, 2019, 9:27 a.m.