rvn_rvc_write {RavenR} | R Documentation |
Given initial conditions for state variables at HRUs, generates a rvc file
rvn_rvc_write( filename, initHRU, init_date, description = "Generated by RavenR rvn_rvc_write", author = NULL )
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 explcit 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. |
TRUE returns TRUE if function runs properly
Leland Scantlebury
rvn_rvc_res
rvn_rvc_from_custom_output
# 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')