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
  • #24
Closed
Open
Issue created Jan 22, 2021 by Nuria Pérez-Zanón@nperezMaintainer

Season to work on 1 dim array input

Hi @aho,

I am fixing startR use case ex2_1_timedim.R. Until now it was using a local version of Season, but it is not necessary since it is already in s2dv. Therefore, it now calls s2dv::Season.

Using the same data and function, the old version of the usecase was needing only one time_dim to work:

  step1 <- Step(fun = fun_spring,
               target_dims = c('time'),
               output_dims = c('time'))

With the version of Season in s2dv, one extra variable should be specified:

  step1 <- Step(fun = fun_spring,
               target_dims = c('var', 'time'),
               output_dims = c('var', 'time'))

in order of avoiding this error:

Error in dim(newX) <- c(prod(d.call), d2) : 
  dims [product 1] do not match the length of object [7]

I think, that adding 'var' or any other variable that is not used in the chunking, is not intuitive for users.

Do you think that Season (and maybe other functions) can be checked to work with 1D?

It is the same error than running this:

test <- array(1:7, c(ftime = 7))
res <- s2dv::Season(test, monini = 1, moninf = 3, monsup = 5)
Error in dim(newX) <- c(prod(d.call), d2) : 
  dims [product 1] do not match the length of object [7]

Thanks in advance,

Núria

Edited Jan 22, 2021 by Nuria Pérez-Zanón
Assignee
Assign to
Time tracking