rvn_watershed_read {RavenR} | R Documentation |
rvn_watershed_read is used to read in the WatershedStorage.csv file produced by Raven.
rvn_watershed_read(ff = NA, tzone = "UTC")
ff |
full file path to the WatershedStorage.csv file |
tzone |
string indicating the timezone of the data in ff |
This function expects a full file path to the WatershedStorage.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.
This function is also built to support the wshd.animate function, which uses the object created here for creating an animation of the watershed storage containers.
ff is the full file path of the WatershedStorage.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.
watershed_storage |
data frame from the file with standardized names |
units |
vector corresponding to units of each column |
rvn_hyd_read
for reading in the Hydrographs.csv file
rvn_watershedmeb_read
for reading in the
WatershedMassEnergyBalance.csv file
# locate in RavenR Watershed storage file ff <- system.file("extdata","run1_WatershedStorage.csv", package="RavenR") # create full file path and read in file mywshd <- rvn_watershed_read(ff) # check data head(mywshd$watershed_storage)