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
  • #89
Closed
Open
Issue created Jan 12, 2023 by Eva Rifà@erifarovMaintainer

RMS() error when time_dim is not 'sdate'

Hi @aho,

I found another error in the .RMS() atomic function. The error is the following:

exp <- array(rnorm(120), dim = c(sdates = 5, ftimes = 2, lon = 1, lat = 1))
obs <- array(rnorm(80),  dim = c(sdates = 5, ftimes = 2, lon = 1, lat = 1))

RMS(exp, obs, time_dim = 'sdates', dat_dim = NULL, conf = TRUE)

"Error in Eno(dif, time_dim, ncores = ncores_input) : 
  Parameter 'time_dim' is not found in 'data' dimension."

It is because this line is hard-coded:

nsdate <- as.numeric(dim(exp)[1])
dif <- array(dim = c(sdate = nsdate, nexp = nexp, nobs = nobs))

The correct line would be:

dif <- array(dim = c(dim(exp)[1], nexp = nexp, nobs = nobs))

I have corrected it in this commit. The changes can be found in this merge request where I have also added a test for this case.

Sorry for the inconvenience to not have seen this error before.

Cheers,
Eva

Edited Jan 12, 2023 by Eva Rifà
Assignee
Assign to
Time tracking