The Raven rvp template file is generated by Raven when the :CreateRVPTemplate command is included in the
rvi file (the default when rvn_rvi_write_template
is used to produce an rvi file). This
template file displays the layout of the rvp file with required parameters based on the hydrologic processes
in the rvi file, but is not immediately usable. This function uses the soil model information in the rvi file
and the HRU class information in the rvh file to rewrite the template file with default parameter values so that
it can be used in a model run.
If rvp_out
is not provided, Raven will attempt to write to the file prefix of the provided template file with a .rvp extension.
If there is a conflict with an existing file and overwrite==FALSE
, the function will automatically overwrite a file
with the suffix "_ravenr_generated.rvp".
The default parameter values come from the RavenParameters.dat file included with RavenR in the extdata folder. The
user may provide their own file with updated values if preferred. Note that the database files held in the RavenR
package are unofficial copies of those in the official Raven SVN, and any discrepancies should defer to the Raven SVN versions.
Any parameters not found in this file will be written
with the value provided by default_param_value
. The default soil thickness for the :SoilProfiles block is provided
by the default_soil_thickness
function parameter, which is applied for all soil classes.
As an alternative to specifying the three input files (rvi, rvh, rvp_temp.rvp), the fileprefix
of the model (e.g.
'Nith' for Nith.rvi) may be provided instead. If provided, the function will attempt to find all required input files based on
the provided fileprefix in the current working directory.
Additional commands can be added to the end of the rvp file with extra_commands
, which are not quality controlled but
simply appended to the rvp file. This can be useful for non-standard commands such as :RedirectToFile for channel properties rvp files
that are not added automatically to base templates rvp files.
If you find parameters not found by this function, please open an ticket on Github (https://github.com/rchlumsk/RavenR/issues).