View source: R/precipitation.R
| ck_total_precip | R Documentation |
Annual or monthly total precipitation in wet days, where a wet day is
a day with precipitation at or above wet_day_threshold mm (default
1 mm, the ETCCDI standard). This is the canonical ETCCDI 'PRCPTOT'
definition (Alexander et al. 2006; Zhang et al. 2011).
ck_total_precip(precip, dates, period = "annual", wet_day_threshold = 1)
precip |
Numeric vector of daily precipitation (mm). |
dates |
Date vector of the same length as |
period |
Character. Aggregation period: |
wet_day_threshold |
Numeric (mm). Days with precipitation strictly below this threshold are excluded from the sum. Default 1. |
Sub-threshold trace amounts are excluded. Pass
wet_day_threshold = 0 to recover the previous behaviour of
summing all daily values.
A data frame with columns period, value, index, and unit.
dates <- as.Date("2024-01-01") + 0:9
precip <- c(0, 5, 3, 0, 8, 2, 0, 1, 4, 0)
ck_total_precip(precip, dates)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.