ck_very_heavy_precip: Very Heavy Precipitation Days

View source: R/precipitation.R

ck_very_heavy_precipR Documentation

Very Heavy Precipitation Days

Description

Count of days with precipitation at or above a threshold (default 20 mm).

Usage

ck_very_heavy_precip(precip, dates, threshold = 20, period = "annual")

Arguments

precip

Numeric vector of daily precipitation (mm).

dates

Date vector of the same length as precip.

threshold

Numeric. Threshold in mm (default 20).

period

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

Value

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

Examples

dates <- as.Date("2024-01-01") + 0:9
precip <- c(0, 5, 22, 0, 15, 25, 0, 11, 4, 30)
ck_very_heavy_precip(precip, dates)

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