readCLASSfile: Reads forcing data from CLASS formatted file

View source: R/readCLASSfile.R

readCLASSfileR Documentation

Reads forcing data from CLASS formatted file

Description

Reads data from files created for CLASS into a stanard CRHMr obs data frame.

Usage

readCLASSfile(
  CLASSfile = "",
  timezone = "",
  convertNames = TRUE,
  quiet = TRUE,
  logfile = ""
)

Arguments

CLASSfile

Required. File of meteorological data in CLASS format.

timezone

Required. 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. Under Linux, you can use CST and MST for Central Standard or Mountain Standard time, respectively. Under Windows or OSX, you can use etc/GMT+6 or etc/GMT+7 for Central Standard and Mountain Standard time. DO NOT use America/Regina as the time zone, as it includes historical changes between standard and daylight savings time.

convertNames

Optional. If TRUE, then the CLASS variables will be converted to Qsi.1, Qli.1, p.1, t.1, ea.1, u.1, and AirPressure.1. Otherwise, the CLASS names SWin, LWin, Prec, T, qa, U, and P will be used.

quiet

Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave quiet=TRUE (i.e. the default). If you are working interactively, you will probably want to set quiet=FALSE.

logfile

Optional. Name of the file to be used for logging the action. Normally not used.

Value

If successful, returns a CRHMr data frame. If unsuccessful, returns the value FALSE.

Author(s)

Kevin Shook, with assistance from Andrew Ireson.

Examples

## Not run: 
class <- readCLASSfile('driv.met', timezone='Etc/GMT+7')
## End(Not run)

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.