##Example synthetic data:
data <- 1:(2 * 3 * 310 * 1)
dim(data) <- c(time = 310, lon = 2, lat = 3, model = 1)
time <- as.POSIXct(paste(sort(rep(1902:1911, 31)), 1, 1:31, sep = "-"), tz = "CET")
metadata <- list(time = list(standard_name = 'time', long_name = 'time',
calendar = 'noleap',
units = 'days since 1970-01-01 00:00:00',
prec = 'double',
dim = list(list(name = 'time', unlim = FALSE))))
attr(time, "variables") <- metadata
attr(data, 'Variables')$dat1$time <- time
threshold <- Threshold(data, dates = NULL, base.range = NULL, qtiles = 0.9,
ncores = NULL)
res <- Extremes(data, threshold = threshold, op = ">", min.length = 6,
spells.can.span.years = TRUE, max.missing.days = 5,
ncores = NULL)
str(res)
Run the code above in your browser using DataLab