ck_r99p: Extremely Wet Days Total (R99p)

View source: R/precipitation.R

ck_r99pR Documentation

Extremely Wet Days Total (R99p)

Description

ETCCDI canonical index R99p. Annual total precipitation on days where daily precipitation exceeds the 99th percentile of wet-day precipitation in a reference period (default 1961 to 1990). Same convention as ck_r95p().

Usage

ck_r99p(precip, dates, ref_start = 1961L, ref_end = 1990L, period = "annual")

Arguments

precip

Numeric vector of daily precipitation (mm).

dates

Date vector of the same length as precip. Must contain data covering the reference period.

ref_start, ref_end

Integer. Reference period boundary years (inclusive). Defaults to 1961 and 1990.

period

Character. Aggregation period: "annual" (default) or "monthly".

Value

A data frame with columns period, value, index, and unit.

Examples

set.seed(1)
dates <- seq(as.Date("1961-01-01"), as.Date("1991-12-31"), by = "day")
precip <- pmax(rgamma(length(dates), shape = 0.4, scale = 8) - 1, 0)
tail(ck_r99p(precip, dates))

climatekit documentation built on May 9, 2026, 5:08 p.m.