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
  • Issues
  • #112
Closed
Open
Issue created Nov 24, 2023 by Nuria Pérez-Zanón@nperezMaintainer

Corr function to work with tos variable

Hi @aho (and @erifarov),

I am using Corr() function with several variables and it works smoothly. However, with tos it fails and it may be due to NAs over land. Output 'corr' doesn't have consistent output length among chunks.

I have a sample data under /esarchive/scracth/nperez

The code to reproduce the problem is

data <- readRDS("failingCorr.RDS")
res <- s2dv::Corr(data$exp, data$obs, dat_dim = NULL, 
                           time_dim = 'syear', 
                           method = 'pearson', 
                           memb_dim = 'ensemble',
                           memb = F,
                           conf = F,
                           pval = F,
                           sign = T,
                           alpha = 0.05) #Fails
res <- s2dv::Corr(data$exp, data$obs, dat_dim = NULL, 
                           time_dim = 'syear', 
                           method = 'pearson', 
                           memb_dim = 'ensemble',
                           memb = T,
                           conf = F,
                           pval = F,
                           sign = T,
                           alpha = 0.05) #Works

The result from 1 multiApply loop differs from the previous ones:

List of 2
 $ corr: num 0.226
 $ sign: logi [1, 1] FALSE
NULL
List of 2
 $ corr: logi [1, 1] NA
 $ sign: logi [1, 1] FALSE
NULL

So, for now, I have just converted the res$corr to a vector res$corr <- as.vector(res$corr) and the function works.

It may be worth it to have a deeper look, but for now I wanted to report the issue.

Cheers,

Núria

Edited Nov 27, 2023 by Nuria Pérez-Zanón
Assignee
Assign to
Time tracking