regi0008 / S2Scalibrationextremeheat

Project is based on climate4R R-based framework for climate data access and post-processing.
0 stars 0 forks source link

To do verification (reliability, ROCSS, CRPSS and resolution) for all calibration methods #4

Closed regi0008 closed 5 years ago

regi0008 commented 5 years ago

To do by Tuesday, 20th August 2019 (everyone)

regi0008 commented 5 years ago

Based on example of 2018_ECOMS-UDG example in climate4R notebook, under their Verifications (Correlation Analysis), there are errors:

Correlation Analysis

object cor contains correlation coefficients for each point.

need to convert list into array

summary(NCEP_Iberia_tas) summary(CFS_Iberia_tas)

obs <- NCEP_Iberia_tas[["Data"]]

obs_array <- array(as.numeric(unlist(obs)))

dim(obs_array) = 86640

fcst <- CFS_Iberia_tas[["Data"]]

fcst_array <- array(as.numeric(unlist(fcst)))

dim(fst_array) = 2599200

cor <- veriApply(verifun = "EnsCorr", fcst = fcst, obs = obs, tdim = length(dim(fcst))-1, ensdim = length(dim(fcst)))

above error:

Error in veriApply(verifun = "EnsCorr", fcst = fcst, obs = obs, tdim = length(dim(fcst)) - :

odims[-otdim] == dim(fcst)[-c(ensdim, tdim)] are not all TRUE

easyVeri2grid is a bridging function that performs transformation

from the raw verification matrices produced by library(easyVerification)

to the grid structure with all required metadata for data collection and representation by climate4R bundle

cor.grid <- easyVeri2grid(easyVeri.mat = cor, obs.grid = NCEP_Iberia_tas[["Data"]], verifun = "EnsCorr")

above error:

$ operator is invalid for atomic vectors

plot correlation map

spatialPlot(climatology(cor.grid), backdrop.theme = "countries", at = seq(-1,1,0.05), colorkey = list(space = "bottom"), main = "Ensemble correlation", sub = "CFSv2 24 member - DJF Mean Temperature (1982-2010")

above error:

Error in getDim(grid) : object 'cor.grid' not found

--------------------------------------

Notes: 1) Am still figuring out if there is anything wrong with the veriApply() function used, and whether the inputs "obs" and "fcst" is correct (as an array/vector)

rykang11 commented 5 years ago

ROCSS done. Leave CRPSS and [reliability, resolution] to be solved.

rykang11 commented 5 years ago

CRPSS done. Leave [reliability, resolution] to be solved.

rykang11 commented 5 years ago

Reliability categories solved.