R/rvn_rvc_from_custom_output.R
rvn_rvc_from_custom_output.Rd
Creates an initial conditions rvc file that specifies the initial state using the information from the supplied custom output file.
rvn_rvc_from_custom_output(filename, custfiles, FUN, init_date = NULL, ...)
filepath of rvc file to be created (with .rvc extension)
array of filepaths to Raven Custom Output files (must be ByHRU)
the aggregation function to be applied to state variables (e.g. mean, passed to sapply)
datetime of model start (optional, can be calculated from Custom Output files)
optional arguments passed to rvn_rvc_write
(e.g. author, description)
if executed successfully
# Create array of custom output file(s)
custout <- c(system.file("extdata","run1_SNOW_Daily_Average_ByHRU.csv",package = "RavenR"))
# Create rvc file of mean snow for each HRU
rvn_rvc_from_custom_output(filename = file.path(tempdir(), "Blank.rvc"),
custfiles = custout,
FUN = mean)
#> [1] TRUE