rvn_rvc_from_custom_output {RavenR}R Documentation

Generate RVC file from Custom Output CSVs

Description

Generate RVC file from Custom Output CSVs

Usage

rvn_rvc_from_custom_output(filename, custfiles, FUN, init_date = NULL, ...)

Arguments

filename

filepath of rvc file to be created (with .rvc extension)

custfiles

array of filepaths to Raven Custom Output files (must be ByHRU)

FUN

the aggregation function to be applied to state variables (e.g. mean, passed to sapply)

init_date

datetime of model start (optional, can be calculated from Custom Output files)

...

optional arguments passed to rvn_rvc_write (e.g. author, description)

Value

TRUE upon success

Author(s)

Leland Scantlebury

Examples

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

[Package RavenR version 2.1.0 Index]