| ck_warm_spell | R Documentation |
Count the number of days in warm spells, where a warm spell is defined
as at least six consecutive days with Tmax above the threshold
quantile of the full input series. This is a quick approximation
driven by a single series-wide quantile, and does not require a
reference period.
ck_warm_spell(tmax, dates, threshold = 0.9, period = "annual")
tmax |
Numeric vector of daily maximum temperatures (degrees C). |
dates |
Date vector of the same length as |
threshold |
Numeric. Quantile threshold (default 0.9, i.e. 90th percentile). |
period |
Character. Aggregation period: |
For the canonical ETCCDI WSDI definition (1961-1990 calendar-day base,
six-day spell rule), use ck_wsdi().
A data frame with columns period, value, index, and unit.
dates <- as.Date("2024-01-01") + 0:364
set.seed(42)
tmax <- rnorm(365, mean = 20, sd = 5)
ck_warm_spell(tmax, dates)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.