# locate hydrograph sample csv data from RavenR package
ff <- system.file("extdata","run1_Hydrographs.csv", package="RavenR")
# read in Raven Hydrographs file, store into mydata
mydata <- rvn_hyd_read(ff, tzone="EST")
# generate rvt file using just observations from Subbasin ID 36
flows <- rvn_ts_infill(mydata$hyd$Sub36_obs)
# weight March-October flows:
wts <- rvn_gen_obsweights(flows,criterion = "BETWEEN_CYCLIC",
startdate="2000-03-01", enddate="2003-11-01")
# and only after March 2003:
wts2 <- rvn_gen_obsweights(flows,criterion = "AFTER",
startdate="2003-03-01")
wts2 <- wts2*wts # product merges weights
# show weights over time
plot(wts2)
Run the code above in your browser using DataLab