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
  • Merge requests
  • !26

Fix bug in SelectPeriodOnData

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Eva Rifà requested to merge develop-Mergefcst into master Jul 14, 2022
  • Overview 0
  • Commits 3
  • Pipelines 1
  • Changes 3

Fixed error reported in issue #13 when using the function MergeRefToExp with one of the input data to merge with the dimension time equal to 1. The error was solved in SelectPeriodOnData function adding the conditional if statement in the following lines:

res <- Apply(list(data, res), target_dims = time_dim,
                 fun = function(x, y) {
                    res <- x[y]
                    if (is.null(dim(res))) {
                      dim(res) <- 1
                      names(dim(res)) <- time_dim
                    }
                    return(res)
                 }, output_dims = time_dim, ncores = ncores)$output1 
  }
Edited Jul 14, 2022 by Eva Rifà
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: develop-Mergefcst