Description Usage Arguments Value References Examples
hyet_split
uses a predefined vector with monthly values
of fixed critical time duration of no precipitation to split an hyetograph
to independent rainstorms.
Returns an error if hyet
is not a valid hyetograph.
1 | hyet_split(hyet, time_step, ts_unit, crit_dur = rep(6, 12))
|
hyet |
an hyetograph from |
time_step |
a numeric value that represents the time-step. |
ts_unit |
a character string specifying the time unit. Valid values are "mins" and "hours". |
crit_dur |
a vector of 12 numeric values in hours. This vector represents the monthly critical time duration of no precipitation that is used to separate the hyetograph to independent rainstorms. Default value for all months is six hours. |
a grouped dataframe with independent rainstorms.
Restrepo-Posada, Pedro J., and Peter S. Eagleson. "Identification of independent rainstorms." Journal of Hydrology 55.1-4 (1982): 303-319.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # create time series with 1 hours time step
time_step <- 30
ts_unit <- "mins"
len <- 90
crit_dur = rep(6,12)
hyet <- tibble::tibble(
date = seq(
from = as.POSIXct(0, origin = "2018-01-01"), length.out = len,
by = paste(time_step, ts_unit)
),
prec = runif(len, 1, 5)
)
hyet$prec[10:23] <- 0
hyet$prec[41:54] <- 0
# split hyetograph to storms
storms <- hyet %>%
hyet_split(time_step, ts_unit, crit_dur)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.