Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • startR startR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 29
    • Issues 29
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • 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
  • startRstartR
  • Merge requests
  • !161

Develop verification

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Nuria Pérez-Zanón requested to merge develop-verification into master Nov 25, 2021
  • Overview 10
  • Commits 22
  • Pipelines 11
  • Changes 7

Hi @amanriqu

I have removed the cross-validation when computing anomalies. It seems that skill decrease. does it make sense?

Cross-validación: https://earth.bsc.es/gitlab/es/startR/-/blob/1c59b44a76868393e068e3496727b65602126864/inst/doc/figures/subseasonal_5.png

Without cross-validación: https://earth.bsc.es/gitlab/es/startR/-/blob/1c59b44a76868393e068e3496727b65602126864/inst/doc/figures/subseasonal_5_v2.png

Below you can find a test to check how I am calculating anomalies. I have also check the speed of two methods and chose the faster.

Let me know your opinion, please.

Cheers,

Núria

library(tictoc)

tic()
forecast <- array(1:24, c(sdate = 2, syear = 3, ensemble = 4))
reference <- array(101:106, c(sdate = 2, syear = 3))

reference <- s2dv::InsertDim(reference, pos = 3, len = 1, name = 'ensemble')

 anomaly <- function(data) {
    avg <- MeanDims(data, c('syear', 'ensemble'))
    if (is.null(dim(avg))) {
       dim(avg) <- c(sdate = length(avg))
    }
    data <- Apply(list(data, avg), 'sdate', function(x,y) x - y)[[1]]
    return(data)
  }

anomaly(reference)
anomaly(forecast)
toc()
tic()
hindcast <- array(1:24, c(sdate = 2, syear = 3, ensemble = 4))
reference <- array(101:106, c(sdate = 2, syear = 3))

reference <- s2dv::InsertDim(reference, pos = 3, len = 1, name = 'ensemble')
  clim <- s2dv:::.Clim(hindcast, reference, time_dim = 'syear',
                       memb_dim = 'ensemble', memb = FALSE)
  hindcast <- Ano(hindcast, clim$clim_exp)
  reference <- Ano(reference, clim$clim_obs)
toc()
Edited Apr 26, 2023 by aho
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: develop-verification