I think there is a bug in .GetProbs() when indices_for_quantiles=NULL
. In case it is NULL, the function should compute it to use the whole period as reference to compute the thresholds between the probabilistic categories (quantiles
). However, this calculation is done in the "big" functions such as GetProbs
, RPS
, RPSS
and ROCSS
, but not in the atomic functions (.GetProbs
, .RPS
and .RPSS
).
Then, if someone (in this case, Nadia with SUNSET) uses these atomic functions without specifying indices_for_clim
, the default value NULL
will cause that quantiles
are NAs and the probabilities are wrong. It can be solved by adding if (is.null(indices_for_quantiles)){indices_for_quantiles <- 1:dim(data)[time_dim]}
at the beginning of .GetProbs
.
I understand that computing indices_for_quantiles
in the "big" functions is better because it is only computed once (instead of every time that .GetProbs
is called), but I think it should (also?) be computed in .GetProbs
.
Please let me know if something is unclear or you want to discuss anything.