read_MESH_OutputTimeseries_csv: Reads MESH output .csv file containing timeseries

Description Usage Arguments Value Author(s) See Also Examples

View source: R/read_MESH_OutputTimeseries_csv.R

Description

Reads a file containing any output from a MASH model into a standard R data frame. The names of the varables will be trimmed to remove leading and trailing spaces, and the time variables are combined into a single R date or datetime.

Usage

1
2
3
4
5
read_MESH_OutputTimeseries_csv(
  outputFile,
  timezone = "",
  missingValueThreshold = -0.1
)

Arguments

outputFile

Required. Name of MESH output file. Must be a .csv file.

timezone

Not required for daily time series. Required for sub-daily time series. The name of the timezone of the data as a character string. This should be the timezone of your data, but omitting daylight savings time. Note that the timezone code is specific to your OS. To avoid problems, you should use a timezone without daylight savings time. You can use etc/GMT+6 or etc/GMT+7 for Central Standard and Mountain Standard time, respectively. DO NOT use America/Regina as the time zone, as it includes historical changes between standard and daylight savings time.

missingValueThreshold

Optional. Any value smaller than this value will be set to NA_real_ when the file is imported. The default value is -0.1 to prevent zero values from being affected.

Value

If successful, returns a data frame. The first columns will be called DATE for daily values, and will contain a standard R date. For sub-daily timeseries the first column will be called DATETIME and will contain a standard POSIXct date/time. If unsuccessful, returns the value FALSE.

Author(s)

Kevin Shook

See Also

simpleHydrograph

Examples

1
2
3
4
5
## Not run: 
timezone <- 'etc/GMT+6'
outfile <- "Basin_average_water_balance_ts.csv"
output <- read_MESH_OutputTimeseries_csv(outfile, timezone)
## End(Not run)

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