library(data.table)
library(ggplot2)
library(knmipluim)

We want to compute the annual cycle of return levels of maximum (and minimum) daily temperature, using the following approach.

windowSize <- 20L
  1. We specify for each day of the year a centered window, eg. r windowSize days prior and after.
  2. For each of these windows we determine the maximum value, which is then related to that calendar day.
  3. With this we obtain for each day one maximum value per year of observations.
  4. From these maxima we compute the GEV parameters by the following procedure:
  5. We estimate the GEV shape parameter for each calendar day (L-Moments)
  6. We smooth the shape parameter (preserving cyclicity)
  7. With the derived shape parameter we estimate location and scale parameter (MLE)
  8. We smooth these parameters as well (preserving cyclicity)
  9. The return levels are calculated based on these smoothed parameters.

For the maxima at De Bilt this looks like:

maxDat <- txDat[name == "tx260_1981_2010"]
#maxDat <- txDat[name == "tx260_WH_2050"]
#maxDat[, name := NULL]
maxRetLevel <- ReturnLevelClimatology(maxDat, "tx", "max",
                                      windowSize = windowSize,
                                      kLoc = 15, kScale = 8, kShape = 4)
PlotEstimates(maxRetLevel)
PlotReturnLevels(maxRetLevel)

And for the minima it looks like:

minDat <- tnDat[name == "tn260_1981_2010"]
#minDat <- tnDat[name == "tn260_WH_2050"]
#minDat[, name := NULL]
minRetLevel <- ReturnLevelClimatology(minDat, "tn", "min",
                                      windowSize = windowSize,
                                      kLoc = 15, kScale = 8, kShape = 4)
PlotEstimates(minRetLevel)
PlotReturnLevels(minRetLevel)


MartinRoth/knmipluim documentation built on May 7, 2019, 3:39 p.m.