View source: R/rvn_exhaustive_mb_read.R
rvn_exhaustive_mb_read | R Documentation |
rvn_exhaustive_mb_read is used to read in the ExhaustiveMassBalance.csv file produced by the modelling Framework Raven.
rvn_exhaustive_mb_read(ff = NA, join_categories = TRUE, tzone = NULL)
ff |
full file path to the ExhaustiveMassBalance.csv file |
join_categories |
boolean whether add to the category tag as a column
name prefix in exhaustivemb output (default |
tzone |
string indicating the timezone of the data in ff |
Expects a full file path to the ExhaustiveMassBalance.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 that is much easier to read.
ff is the full file path of the ExhaustiveMassBalance.csv file. If the file is located in the current working directory, then simply the name of the file is sufficient.
tzone is a string indicating the timezone of the supplied file. The timezone provided is coded into the resulting data frame using the as.POSIXct function. If no timezone is provided, this is left as an empty string, and is determined by the function as the current time zone.
exhaustivemb |
data frame from the file with standardized names |
units |
vector corresponding to units of each column |
categories |
vector corresponding to the storage category of each column |
rvn_hyd_read
for reading in the Hydrographs.csv file, and
rvn_exhaustive_mb_read
for reading in the
WatershedMassEnergyBalance.csv file
# Read in exhaustive MB file, create plot
ff <- system.file("extdata","run1_ExhaustiveMassBalance.csv", package="RavenR")
embd <- rvn_exhaustive_mb_read(ff)
# Preview data
head(embd$exhaustive_mb)
# Plot data
plot(embd$exhaustive_mb$SURFACE_WATER.Infiltration,
main="Cumulative Surface Water Infiltration")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.