ccr | R Documentation |
Climate conserving recalibration with correction factors for each lead time without smoothing (application to daily series not recommended).
ccr(fcst, obs, fcst.out = fcst, type = c("calibration", "prediction"), ...)
fcst |
n x m x k array of n lead times, m forecasts, of k ensemble members |
obs |
n x m matrix of veryfing observations |
fcst.out |
array of forecast values to which bias correction should be
applied (defaults to |
type |
if set to "prediction", additional inflation of the spread as in linear regression (see details) |
... |
additional arguments for compatibility with other bias correction methods |
In calibration
mode, the climate conserving recalibration
(CCR) follows Weigel et al. (2008). In prediction
mode, the
CCR spread correction is expanded to take into account additional
uncertainty from the signal calibration following linear regression theory.
I.e. the inflation factor s.pred
is
s.pred = s \sqrt{1 + 1/n + f_0^2 / \sum{f_j^2}}
where f_0
is the ensemble mean forecast anomaly that is to be
adjusted, and \sum{f_j^2}
is the sum of the squared
ensemble mean forecast anomalies in the calibration set. n
is the
number of forecast instances in the calibration set.
Weigel, A., M. Liniger and C. Appenzeller (2008). Seasonal Ensemble Forecasts: Are Recalibrated Single Models Better than Multimodels? Monthly Weather Review, 137(4), 1460-1479.
fcst <- array(rnorm(3000*1*51, mean=1, sd=rep(seq(0.5,2, length=3000), each=1)),
c(1, 3000, 51)) + 0.5*sin(seq(0,4,length=1))
obs <- array(rnorm(3000, mean=2), c(1, 3000)) + sin(seq(0,4, length=1))
fcst.debias <- biascorrection:::ccr(fcst, obs)
f.rmse <- sqrt(apply((obs - apply(fcst.debias, 2, mean))**2, 1, mean))
f.sd <- sqrt(mean(apply(fcst.debias, 2, sd)**2))
f.sd / f.rmse ## should be exactly 1
mean(fcst.debias - obs[1,]) ## should be 0 (rounding errors)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.