rvn_rvc_write {RavenR} | R Documentation |
Write Raven Initial Condition (rvc) file
Description
Given initial conditions for state variables at HRUs, generates a rvc file
Usage
rvn_rvc_write(
filename,
initHRU,
init_date,
description = "Generated by RavenR rvn_rvc_write",
author = NULL
)
Arguments
filename |
filepath of rvc file to write to (with .rvc extension) |
initHRU |
dataframe of initial conditions for state variables (columns) for each HRU (rows). columns must be valid SV names and there must be an explicit column of HRU ids named 'HRU'. |
init_date |
datetime of model start |
description |
(optional) Description added after file header |
author |
(optional) Name of author, to be printed in file header. |
Value
TRUE |
return |
Author(s)
Leland Scantlebury
See Also
rvn_rvc_res
rvn_rvc_from_custom_output
Examples
# Create an initial condition HRU table where SOIL[0] is 0.5mm for all HRUs
# Check.names is set to FALSE to allow for brackets in the column name
initHRU <- data.frame('HRU'=1:10, 'SOIL[0]'=0.5, check.names=FALSE)
model_start = as.Date('2001-10-01')
# Generate RVC file
rvn_rvc_write(filename = file.path(tempdir(), "New.rvc"),
initHRU = initHRU,
init_date = model_start,
author = 'Harry Potter')
[Package RavenR version 2.2.2 Index]