Description Usage Arguments Value Note Examples
hyet_interar
uses independent rainstorms that comes
from the hyet_split
function and computes their interarrival and
dry time duration.
Returns an error if storms
is not a valid grouped hyetograph.
1 | hyet_arrive(storms)
|
storms |
a grouped dataframe with independent rainstorms. |
a tibble with the duration, total precipitation height and interarrival and dry times in hours of the independent rainstorms.
Please note that the interarrival and dry time durations for the first rainstorms is set to zero.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # create time series with 1 hours time step
time_step <- 1
ts_unit <- "hours"
len <- 30
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)
)
# create 2 dry durations of 6 hours
hyet$prec[10:15] <- 0
hyet$prec[21:26] <- 0
# add some zeros
hyet$prec[2:5] <- 0
# split hyet and compute interarrival times
hyet %>%
hyet_split(time_step, ts_unit, crit_dur) %>%
hyet_arrive()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.