# R code developed by: # International Research Institute for Climate and Society # Columbia University in the City of New York, USA # Last update: Jully 3, 2013 # -------------------------------------------------------------------------------- # Dependancies : (see each function for further details) # -- Function "ExtractContinuousScores.R" and associated files of scores # -- Function "Plot_Comparison.R" # -------------------------------------------------------------------------------- # Actions : # -- For the four models, exctract scores for corrected and uncorrected models and plot them # -------------------------------------------------------------------------------- Directory_Output<-"/Volumes/shared_data/paulb/Results/Results/Skills/" source("/Volumes/shared_data/paulb/R/Functions/Verification/Plot_Comparison_Multi.R") source("/Volumes/shared_data/paulb/R/Functions/Verification/ExtractScores.R") for (XXX in c("WCT","MAC","AM","ABP")) { # Continuous Nominal SMC SMC<-ExtractContinuousScores(XXX,3,"ensemble","corrected_SMC",FALSE) SLC<-ExtractContinuousScores(XXX,3,"ensemble","corrected_SLC",FALSE) Uncor<-ExtractContinuousScores(XXX,3,"ensemble","uncorrected",FALSE) dev.new() par(mfrow = c(1,3)) Plot_Comparison(list(Uncor$MSE,SMC$MSE, SLC$MSE),c("Uncorreted prediction","SMC Corrected Prediction","SLC Corrected Prediction"),"Ending time of the simulation (Sm+L),, from January to December","MSE","") Plot_Comparison(list(Uncor$SS,SMC$SS, SLC$SS),NULL,"Ending time of the simulation (Sm+L), from January to December","SS",paste("Three month predictions by the ",XXX," model")) Plot_Comparison(list(Uncor$Bias,SMC$Bias, SLC$Bias),NULL,"Ending time of the simulation (Sm+L),, from January to December","Bias","") } # Proba # SMCA<-ExtractProbalisticScores(XXX,"corrected_SMC",1) # SLCA<-ExtractProbalisticScores(XXX,"corrected_SLC",1) # UncorA<-ExtractProbalisticScores(XXX,"uncorrected",1) # dev.new() # par(mfrow = c(1,3)) # Plot_Comparison(list(UncorA$BS,SMCA$BS, SLCA$BS),c("Uncorreted prediction","SMC Corrected Prediction","SLC Corrected Prediction"),"Lead Time, from January to December","Brier Score","") # Plot_Comparison(list(UncorA$SS,SMCA$SS, SLCA$SS),c("Uncorreted prediction","SMC Corrected Prediction","SLC Corrected Prediction"),"Lead Time, from January to December","Brier Skill Score",paste("Probalistic scores for three month predictions by the ",XXX," model for event 1")) # Plot_Comparison(list(UncorA$ROC,SMCA$ROC, SLCA$ROC),c("Uncorreted prediction","SMC Corrected Prediction","SLC Corrected Prediction"),"Lead Time, from January to December","ROC Score","")