Correct the following errors from [MostLikelyTercile_vignette.Rmd
]:(https://earth.bsc.es/gitlab/external/cstools/-/blob/develop-MostLikelyTercile_vignette/vignettes/MostLikelyTercile_vignette.Rmd)
- Error in the variable names
ano_exp$data
andano_obs$data
. The correct names wereAno_Exp$data
andAno_Obs$data
. - List indexing was wrong in these lines:
mask_rpss <- RPSS[[1]]
mask_rpss[RPSS[[1]] <= 0] <- 1
mask_rpss[is.na(RPSS[[1]])] <- 1
mask_rpss[RPSS[[1]] > 0] <- 0
"From the RPSS, we create a mask: regions with RPSS <= 0 will be masked.", only RPSS (i.e., RPSS$data$skillscore
) is used. More consistent with the explanation to use RPSS$data$skillscore
to create mask_rpss
(and in PlotMostLikelyQuantileMap()
, use mask = mask_rpss[, , 1]
)
# Suggest using RPSS$data$skillscore to create mask_rpss
mask_rpss <- ifelse((RPSS$data$skillscore <= 0) | is.na(RPSS$data$skillscore), 1, 0)
-
Figures from
PlotMostLikelyQuantileMap()
function returned the following error:Error in plot.new() : figure margins too large
. It has been increased the file height and width and reduced the legend scale in this commmit. -
Remove library(s2dverification) and library(multiApply) since they're not necessary for this vignette; add
library(ClimProjDiags)
for Subset() -
Change to use s2dv::ProbBins (right now, it uses the one from s2dverification)
PB <- ProbBins(Ano_Exp$data, fcyr = numyears, thr = c(1/3, 2/3), quantile = TRUE,
posdates = 3, posdim = 2, compPeriod = "Without fcyr")