rvn_forcings_read {RavenR} | R Documentation |
Read in Raven ForcingFunctions file
Description
rvn_forcings_read is used to read in the ForcingFunctions.csv file produced by the modelling Framework Raven.
Usage
rvn_forcings_read(ff = NA, tzone = "UTC")
Arguments
ff |
full file path to the ForcingFunctions.csv file |
tzone |
string indicating the timezone of the data in ff |
Details
Expects a full file path to the ForcingFunctions.csv file, then reads in the file using read.csv. The main advantage of this functon is renaming the columns to nicer names and extracting the units into something much easier to read.
ff is the full file path of the ForcingFunctions.csv file. If the file is located in the current working directory, then simply the name of the file is sufficient.
The timezone is provided by the tzone argument as "UTC" by default, and should be adjusted by the user to the local time zone as needed, based on the model run.
Value
forcings |
data frame from the file with standardized names |
units |
vector corresponding to units of each column |
See Also
rvn_hyd_read
for reading in the Hydrographs.csv file
Examples
# read in sample forcings data
ff <- system.file("extdata","run1_ForcingFunctions.csv", package="RavenR")
myforcings <- rvn_forcings_read(ff)
# check data (first 5 columns for brevity)
head(myforcings$forcings[,1:5])
summary(myforcings$forcings[,1:5])