Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • s2dv s2dv
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • s2dvs2dv
  • Merge requests
  • !163

Fix indices_for_clim in GetProbs

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Carlos Delgado Torres requested to merge develop-GetProb-fix into master Sep 08, 2023
  • Overview 3
  • Commits 3
  • Pipelines 0
  • Changes 1

Hi @aho and @erifarov,

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.

Thank you!
Carlos @nmilders @nperez

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: develop-GetProb-fix