View source: R/rvn_watershedmeb_read.R
rvn_watershedmeb_read | R Documentation |
Used to read in the WatershedMassEnergyBalance.csv file produced by the modelling Framework Raven.
rvn_watershedmeb_read(ff = NA, tzone = "UTC")
ff |
full file path to the WatershedMassEnergyBalance.csv file |
tzone |
string indicating the timezone of the data in ff |
Expects a full file path to the WatershedMassEnergyBalance.csv file, then reads in the file using read.csv. The main advantage of this function is renaming the columns to nicer names and extracting the units into something much easier to read. The from and to rows are also properly handled, which is not as straightforward as some of the other Raven files.
ff is the full file path of the WatershedMassEnergyBalance.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.
watershedmeb |
data frame from the file with standardized names |
units |
vector corresponding to units of each column |
from |
vector of the 'from' compartments in file |
to |
vector of the 'to' compartments in file |
rvn_watershed_read
for reading in the
WatershedStorage.csv file
# locate RavenR Watershed Mass Energy Balance storage file
ff <- system.file("extdata","run1_WatershedMassEnergyBalance.csv", package="RavenR")
# read in file
mywshdmeb <- rvn_watershedmeb_read(ff)
# view mass energy balance time series
head(mywshdmeb$watershedmeb)
# view 'from' dataframe
mywshdmeb$from
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.