calLM | R Documentation |
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.
calLM(
fcst.grid,
obs.grid,
crossval = TRUE,
apply.to = c("all", "sig"),
alpha = 0.1
)
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 |
alpha |
Significance (0.1 by default) of the ensemble mean correlation (i.e. |
climate4R grid. Calibrated forecasts.
Ensemble Model Output Statistics (EMOS) methods use the correspondence between the ensemble mean and the observations in the calibration process.
R. Manzanas and J. Bhend.
Other calibration:
calCCR()
,
calMVA()
,
calNGR()
,
calRPC()
{
## 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)"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.