Learn R Programming

ensembleMOS (version 0.8.2)

ensembleMOS: EMOS modeling

Description

Fits a EMOS model to ensemble forecasts. Allows specification of a model, training rule, and forecasting dates.

Usage

ensembleMOS(ensembleData, trainingDays, consecutive = FALSE,
            dates = NULL, control = NULL, warmStart = FALSE,
            model = NULL, exchangeable = NULL)

Arguments

ensembleData

An ensembleData object including ensemble forecasts with the corresponding verifying observations and their dates. Missing values (indicated by NA) are allowed.

trainingDays

An integer giving the number of time steps (e.g. days) in the training period. There is no default.

consecutive

If TRUE then the sequence of dates in the training set are treated as consecutive, i.e. date gaps are ignored

dates

The dates for which EMOS forecasting models are desired. By default, this will be all dates in ensembleData for which modeling is allowed given the training rule.

control

A list of control values for the fitting functions. The corresponding control function has to be chosen in accordance with the selected model. For the Gaussian (normal) EMOS model see controlMOSnormal, for the truncated normal model see controlMOStruncnormal, for the log-normal model see controlMOSlognormal, for the censored and shifted gamma model see controlMOScsg0, and for the censored generalized extreme value distribution model see controlMOSgev0.

warmStart

If TRUE, then starting values for parameters in optimization are set to the estimates of the preceding date's fit.

model

A character string describing the EMOS model to be fit. Current choices are "normal" (typically used for temperature or pressure data), "truncnormal" (typically used for wind speed data), "lognormal" (typically used for wind speed data), "csg0" (typically used for precipitation accumulation data), and "gev0" (typically used for precipitation accumulation data). For specific details on model fitting see ensembleMOSnormal, ensembleMOStruncnormal, ensembleMOSlognormal, ensembleMOScsg0, or ensembleMOSgev0.

exchangeable

A numeric or character vector or factor indicating groups of ensemble members that are exchangeable (indistinguishable). The model fit will have equal weights and parameters within each group. The default determines exchangeability from ensembleData.

Value

A list containing information on the training (length, lag and the number of instances used for training for each modeling date), the exchangeability, and vectors and/or matrics containing the estimated regression and variance coefficient values depending on the specified model.

Details

If dates are specified in dates that cannot be forecast with the training rule, the corresponding EMOS model parameter outputs will be missing (NA) but not NULL. The training rule uses the number of days corresponding to its length regardless of whether or not the dates are consecutive.

References

Gaussian (normal) EMOS model: T. Gneiting, A. E. Raftery, A. H. Westveld and T. Goldman, Calibrated probabilistic forecasting using ensemble model output statistics and minimum CRPS estimation. Monthly Weather Review 133:1098--1118, 2005.

Truncated normal EMOS model: T. L. Thorarinsdottir and T. Gneiting, Probabilistic forecasts of wind speed: Ensemble model output statistics by using heteroscedastic censored regression. Journal of the Royal Statistical Society Series A 173:371--388, 2010.

Log-normal EMOS model: S. Baran and S. Lerch, Log-normal distribution based Ensemble Model Output Statistics models for probabilistic wind-speed forecasting. Quarterly Journal of the Royal Meteorological Society 141:2289--2299, 2015.

Censored and shifted gamma EMOS model: M. Scheuerer and T. M. Hamill, Statistical post-processing of ensemble precipitation forecasts by fitting censored, shifted gamma distributions. Monthly Weather Review 143:4578--4596, 2015. S. Baran and D. Nemoda, Censored and shifted gamma distribution based EMOS model for probabilistic quantitative precipitation forecasting. Environmetrics 27:280--292, 2016.

Censored generalized extreme value distribution EMOS model: M. Scheuerer, Probabilistic quantitative precipitation forecasting using ensemble model output statistics. Quarterly Journal of the Royal Meteorological Society 140:1086--1096, 2014.

See Also

trainingData, ensembleMOSnormal, ensembleMOStruncnormal, ensembleMOSlognormal, ensembleMOScsg0, ensembleMOSgev0, controlMOSnormal, controlMOStruncnormal, controlMOSlognormal, controlMOScsg0, controlMOSgev0,

Examples

Run this code
# NOT RUN {
data("ensBMAtest", package = "ensembleBMA")

ensMemNames <- c("gfs","cmcg","eta","gasp","jma","ngps","tcwb","ukmo")

obs <- paste("T2", "obs", sep = ".")
ens <- paste("T2", ensMemNames, sep = ".")
tempTestData <- ensembleData(forecasts = ensBMAtest[,ens],
                             dates = ensBMAtest[,"vdate"],
                             observations = ensBMAtest[,obs],
                             station = ensBMAtest[,"station"],
                             forecastHour = 48,
                             initializationTime = "00")

tempTestFit <- ensembleMOS(tempTestData, trainingDays = 25, 
                           model = "normal")

 ## Same as
 ## tempTestFit <- ensembleMOSnormal(tempTestData, trainingDays = 25)
# }

Run the code above in your browser using DataLab