hyet_intensities: Compute maximum rolling intensities from an hyetograph

Description Usage Arguments Value Note Examples

View source: R/hyet_intensities.R

Description

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.

Usage

1
hyet_intensities(hyet, time_step, ts_unit)

Arguments

hyet

an hyetograph from hyet_create function.

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".

Value

a tibble with the maximum rolling rainfall intensities for 5, 10, 15, 30 minutes and 1, 2, 3, 6, 12, 24 and 48 hours

Note

missing date values must be set explicit using the hyet_fill function if a single hyetograph is used. hyet_split returns filled storms.

Examples

 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)

kvantas/hyetor documentation built on Sept. 2, 2019, 12:57 a.m.