View source: R/rvn_calc_runoff_coeff.R
| rvn_calc_runoff_coeff | R Documentation | 
Uses the rvh, custom precipitation, and hydrograph information to determine runoff coefficients.
rvn_calc_runoff_coeff(
  rvhfile,
  custfile = "PRECIP_Daily_Average_BySubbasin.csv",
  hydfile = "Hydrographs.csv",
  correct = FALSE
)
rvhfile | 
 file path to Raven rvh file  | 
custfile | 
 file path to Raven-generated custom output precip-by-subbasin file  | 
hydfile | 
 file path to Raven-generated hydrographs file  | 
correct | 
 (optional) if   | 
Reads model.rvh file and daily avg subbasin precip file (usually PRECIP_Daily_Average_BySubbasin.csv) and generates data frame describing runoff coefficients of gauged basins and observation data coverage. Uses precipitation from entire model run history. Only determines runoff coefficient from available data - prone to overestimation with poor observation coverage.
data frame with runoff coefficients of gauged basins
James R. Craig, University of Waterloo
rvn_rvh_read for reading and processing Raven rvh file
 myrvh <- system.file("extdata","Nith.rvh", package="RavenR")
 mycust <- system.file("extdata", "run1_PRECIP_Daily_Average_BySubbasin.csv", package="RavenR")
 myhyd <- system.file("extdata", "run1_Hydrographs.csv", package="RavenR")
 rcs <- rvn_calc_runoff_coeff(myrvh, mycust, myhyd, correct=TRUE)
 rcs
 # create a bar plot
 runcoefs <- subset(rcs,select=c(runoff_coeff_sim,runoff_coeff_obs))
 bp <- barplot(t(as.matrix(runcoefs)),
  main="Runoff Coefficient Comparison (w/ rough data coverage correction)",
  ylab = "Runoff coeff", ylim=c(0,1),beside=TRUE,
  col=c("blue","deepskyblue"),legend.text=c("sim","obs"),las=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.