if (FALSE) # R check
data(ensBMAtest)
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 <- ensembleBMAnormal( tempTestData, trainingDays = 30)
MAE( tempFit, tempTestData)
CRPS( tempFit, tempTestData)
#----------------------------------------------------------------------------
obs <- paste("PCP24","obs", sep = ".")
ens <- paste("PCP24", ensMemNames, sep = ".")
prcpTestData <- ensembleData( forecasts = ensBMAtest[,ens],
dates = ensBMAtest[,"vdate"],
observations = ensBMAtest[,obs],
station = ensBMAtest[,"station"],
forecastHour = 48,
initializationTime = "00")
prcpTestFit <- ensembleBMAgamma0( prcpTestData, trainingDays = 30)
MAE( prcpTestFit, prcpTestData)
CRPS( prcpTestFit, prcpTestData)
#----------------------------------------------------------------------------
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")
winsTestFit <- ensembleBMAgamma(winsTestData, trainingDays = 30)
MAE( winsTestFit, winsTestData)
CRPS( winsTestFit, winsTestData)
Run the code above in your browser using DataLab