rvn_rvi_read {RavenR} | R Documentation |
Read Raven .rvi (watershed discretization) file
Description
This routine reads in a valid Raven main input (.rvi) file and returns the information about hydrological processes as a data table.
Usage
rvn_rvi_read(filename)
Arguments
filename |
the name of the .rvi file (with .rvi extension included), either relative to the working directory or absolute. |
Details
This function does not like tabs in the .rvi file - it should be untabified first. Comma-delimited tables with a trailing comma are also problematic. The .rvi file can have arbitrary contents outside of the :HydrologicProcesses- :EndHydrologicProcesses block and :SubBasins-:EndSubBasins command blocks.
Value
Returns a list with two items:
HydProcTable |
a data table of hydrologic processes. Includes the following data columns: process type, algorithm, 'from' compartment, 'to' compartment, conditional (logical), and condition (character) |
AliasTable |
a table of aliases read from the rvi file, |
Author(s)
James R. Craig, University of Waterloo
Examples
# sample workflow of rvn_rvi_read
rvi <- system.file("extdata","Nith.rvi", package="RavenR") %>%
rvn_rvi_read(.)
# get number of Hydrologic processes
nrow(rvi$HydProcTable)