calLM: Linear regression based calibration of seasonal climate...

View source: R/calLM.R

calLMR Documentation

Linear regression based calibration of seasonal climate forecasts

Description

This function performs an EMOS-like linear regression between the ensemble mean and the corresponding observations. To correct the forecast variance, the standardized anomalies are rescaled by the standard deviation of the predictive distribution from the linear fitting.

Usage

calLM(
  fcst.grid,
  obs.grid,
  crossval = TRUE,
  apply.to = c("all", "sig"),
  alpha = 0.1
)

Arguments

fcst.grid

climate4R grid. Forecasts to be calibrated (typically on a monthly/seasonal basis). At the moment, only gridded data are supported.

obs.grid

climate4R grid. Reference observations the forecasts are calibrated towards (typically on a monthly/seasonal basis).

crossval

Logical. TRUE (default) for leave-one-out-out cross-validation. FALSE for not cross-validation.

apply.to

Character. If "all" is selected, all forecasts are calibrated. Alternatively, if "sig" is selected, the calibration is only applied in those points where the correlation between the ensemble mean and the observations is statistically significant.

alpha

Significance (0.1 by default) of the ensemble mean correlation (i.e. "alpha = 0.05" would correspond to a 95% confidence level). Only works if "apply.to = sig".

Value

climate4R grid. Calibrated forecasts.

Note

Ensemble Model Output Statistics (EMOS) methods use the correspondence between the ensemble mean and the observations in the calibration process.

Author(s)

R. Manzanas and J. Bhend.

See Also

Other calibration: calCCR(), calMVA(), calNGR(), calRPC()

Examples

{
## loading seasonal forecasts (CFS) and observations (NCEP) of boreal winter temperature over Iberia
require(climate4R.datasets)
data("CFS_Iberia_tas"); fcst = CFS_Iberia_tas
data("NCEP_Iberia_tas"); obs = NCEP_Iberia_tas
## passing from daily data to seasonal averages
fcst = aggregateGrid(fcst, aggr.y = list(FUN = "mean", na.rm = TRUE))
obs = aggregateGrid(obs, aggr.y = list(FUN = "mean", na.rm = TRUE))
## interpolating forecasts to the observations' resolution
fcst = interpGrid(fcst, new.coordinates = getGrid(obs))
## applying calibration
fcst.cal = calLM(fcst, obs, crossval = TRUE, apply.to = "all")
## plotting climatologies
library(visualizeR)
spatialPlot(makeMultiGrid(climatology(obs),
                         climatology(fcst, by.member = FALSE),
                         climatology(fcst.cal, by.member = FALSE)),
           backdrop.theme = "coastline",
           layout = c(3, 1),
           names.attr = c("NCEP", "CFS (raw)", "CFS (calibrated)"))
}

SantanderMetGroup/calibratoR documentation built on July 8, 2023, 2:49 p.m.