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)
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, NULL if no aliases are included
Arguments
filename
the name of the .rvi file (with .rvi extension included), either relative
to the working directory or absolute.
Author
James R. Craig, University of Waterloo
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.
# sample workflow of rvn_rvi_readrvi <- system.file("extdata","Nith.rvi", package="RavenR") %>%
rvn_rvi_read(.)
# get number of Hydrologic processesnrow(rvi$HydProcTable)