View source: R/cloud_ind_MCH.R
climdex.cloud.CC98 | R Documentation |
This function was originally written to calculate the 98th quantile of the lenghts of sunny/cloudy spells per season. However, any quantile can be chosen. The center of the spell determines to which date.factor the spell is counted to and theoretically, spells can last longer than the duration of a date.factor.
climdex.cloud.CC98(ci, threshold, op, q)
ci |
Object of type climdexInput. |
op |
Operator that compares cloud.okta with threshold. |
q |
Quantile that should be calculated. |
thresh |
Threshold value |
for each date.factor the quantile of the spell lenghts op threshold
# example date.series date.series <- seq(as.POSIXct("2017/01/01", tz="UTC"), as.POSIXct("2017/12/31", tz = "UTC"), by = "day") # example cloud.okta sam <- rep(c(runif(300,0,3),runif(10,3,6), runif(500,6,8)), 1000) cloud.okta <- sample(sam,length(date.series)) # climdexInput object ci <- climind::climdexInput.raw(cloud = cloud.okta, cloud.dates = PCICt::as.PCICt.POSIXct(date.series, cal="gregorian")) # CC98 Index CC98.2 <- climdex.cloud.CC98(ci = ci, threshold = 3, op = "<", q = 0.98) CC98.6 <- climdex.cloud.CC98(ci = ci, threshold = 6, op = ">=", q = 0.98)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.