read_tb0: Reads a MESH tb0 file

Description Usage Arguments Value Author(s) See Also Examples

View source: R/read_tb0.R

Description

Reads in a tb0 file. The time series values, if present, will be stored in a data frame. Optionally, the meta data will be stored as lists. The meta data are of 2 types, the header values, which refer to the entire file and column values, which pertain to individual columns.

Usage

1
read_tb0(tb0File = "", values_only = TRUE, timezone = "", NAvalue = NULL)

Arguments

tb0File

Required. The name of the file to be read.

values_only

Optional. If TRUE (the default), only the time series values will be returned. If FALSE, the meta data will also be returned. Note that if the value is set to TRUE, and there are no time series values in the file, as for a reservoir file, then an error will result.

timezone

Optional. The data time series have POSIXct datetime values. You may want to specify the timezone of the data. If the timezone is not specified, your default value (i.e. your time zone) will be used.

NAvalue

Optional. If specified, values smaller than NAvalue will be set to NA_real_

Value

Returns time series as a data frame. If meta data are specified, they are returned as a list of header data and a data frame of column meta data. In this case all three sets of data are combined in a single

Author(s)

Kevin Shook

See Also

read_r2c_raster read_MESH_OutputTimeseries_csv

Examples

1
2
3
4
## Not run: 
qvals <- read_tb0("MESH_input_streamflow.tb0", NAvalue = -0.01, values_only = TRUE)

## End(Not run)

CentreForHydrology/MESHr documentation built on Jan. 11, 2021, 8:34 p.m.