data(ensBMAtest)
ensMemNames <- c("gfs","cmcg","eta","gasp","jma","ngps","tcwb","ukmo")
obs <- paste("MAXWSP10","obs", sep = ".")
ens <- paste("MAXWSP10", ensMemNames, sep = ".")
winsTestData <- ensembleData( forecasts = ensBMAtest[,ens],
dates = ensBMAtest[,"vdate"],
observations = ensBMAtest[,obs],
station = ensBMAtest[,"station"],
forecastHour = 48,
initializationTime = "00")
if (FALSE) # R check
winsTestFit <- ensembleBMAgamma(winsTestData, trainingDays = 30,
control = controlBMAgamma(startupSpeed = 1))
## equivalent to
## winsTestFit <- ensembleBMA(winsTestData, trainingDays = 30,
## model = "gamma")
# for quick run only; use more training days for forecasting
winsTestFit <- ensembleBMAgamma(winsTestData[1:14,], trainingDays = 5,
control = controlBMAgamma(startupSpeed = 1))
Run the code above in your browser using DataLab