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"],
startupSpeed = 1,
forecastHour = 48,
initializationTime = "00")
if (FALSE) # R check
winsTrain <- trainingData( winsTestData, trainingDays = 30,
date = "2008010100")
# for quick run only; use more training days for forecasting
winsTrain <- trainingData( winsTestData, trainingDays = 10,
date = "2008010100")
winsTrainFit <- fitBMAgamma( winsTrain)
## equivalent to
## winsTrainFit <- fitBMA( winsTrain, model = "gamma")
Run the code above in your browser using DataLab