Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • CSIndicators CSIndicators
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • CSIndicatorsCSIndicators
  • Issues
  • #13
Closed
Open
Issue created May 28, 2021 by amartine@amartineDeveloper

Possible bug in MergeRefToExp

Hi @nperez

I may have found that when you use the function MergeRefToExp with one of the input data to merge with the dimension time equal to 1, it gives you back the next error:

Error in FUN(X[[i]], ...) :
  Expected 1st returned element by 'fun' to have 1 dimensions, but 0 found.

I add here some lines of code to explain myself:


> dim(data_obs_tas_added)
    sweek      sday     syear      time  latitude longitude  ensemble
        1         1        11         1        28        56        25
> dim(data_tas_hcst)
    sweek      sday     syear      time  latitude longitude  ensemble
        1         1        11         2        28        56        25
> test <- MergeRefToExp(data_obs_tas_added, obs_dates, list(1,5), list(31,5),
+                                data_tas_hcst, hcst_dates, list(1,6), list(31,7),
+                                time_dim = 'time', sdate_dim = 'syear',
+                                ncores = NULL)
Error in FUN(X[[i]], ...) :
  Expected 1st returned element by 'fun' to have 1 dimensions, but 0 found.
>

when the case is the same but with the time dimension of data_obs_tas_added greater than one, the function merge data_obs_tas_added and data_tas_hcst perfectly.

cheers, Albert M.

FYI @lpalma

Edited May 28, 2021 by amartine
Assignee
Assign to
Time tracking