Description Usage Arguments Value Note Examples
View source: R/hyet_intensities.R
hyet_intensities
uses an hyetograph, single or grouped
(i.e. from hyet_split
) and computes characteristic maximum rolling
precipitation intensities. Returns an error if hyet
is not a valid
hyetograph.
1 | hyet_intensities(hyet, time_step, ts_unit)
|
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". |
a tibble with the maximum rolling rainfall intensities for 5, 10, 15, 30 minutes and 1, 2, 3, 6, 12, 24 and 48 hours
missing date values must be set explicit using the hyet_fill
function if a single hyetograph is used. hyet_split
returns filled
storms.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # set values
time_step <- 1
ts_unit <- "hours"
len <- 18
# create an hyetograph
hyet <- tibble::tibble(
date = seq(
from = as.POSIXct(0, origin = "2018-01-01"), length.out = len,
by = paste(time_step, ts_unit)
),
prec = seq(1, 18, 1)
)
# add a dry period
hyet$prec[5:10] <- 0
# split to storms and calculate intensities per storm
intens <- hyet %>%
hyet_split(time_step, ts_unit) %>%
hyet_intensities(time_step, ts_unit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.