precip_half: Number of days in which half of precip falls

Description Usage Arguments Value Examples

View source: R/measure_intensity.R

Description

Number of days in which half of precip falls

Usage

1
precip_half(x, threshold = 0)

Arguments

x

numeric vector of daily precip for one year

threshold

discard values under a given threshold (good if worried about sensor sensitivity of old data, etc)

Value

number of wettest days it took to get half of the annual precip (this is a metric of precip intensity) trying to do what is described by Pendergrass and Knutti 2018

Examples

1
2
precip_half(c(0, 0.1, 0.5, 0.5))
precip_half(x = c(1, 2, 1.5, 0.1, 0.1, 0.1), threshold = 0.1)

MartinHoldrege/precipr documentation built on Nov. 4, 2021, 11:10 a.m.