rvn_watershed_read: Read in Raven WatershedStorage file

View source: R/rvn_watershed_read.R

rvn_watershed_readR Documentation

Read in Raven WatershedStorage file

Description

Read in the WatershedStorage.csv file produced by Raven.

Usage

rvn_watershed_read(ff = NA, tzone = "UTC")

Arguments

ff

full file path to the WatershedStorage.csv file

tzone

string indicating the timezone of the data in ff

Details

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.

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.

Value

watershed_storage

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 rvn_watershedmeb_read for reading in the WatershedMassEnergyBalance.csv file

Examples


# 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)


rchlumsk/RavenR documentation built on April 19, 2024, 5:15 a.m.