Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • startR startR
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 30
    • Issues 30
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • 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 Sciences
  • startRstartR
  • Merge requests
  • !28

Apply input data needs names to work with use_attributes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Nuria Pérez-Zanón requested to merge develop-InputnNames into master Oct 09, 2019
  • Overview 1
  • Commits 2
  • Changes 1

Hi @aho!

I want to check how well ClimProjDiags fits with Compute, as ClimProjDiags is following the approach of working in arrays of any number of dimensions with named dimensions.

To do it, I would develop examples for each of them. The first one has been DTRRef, which inputs are two variables maximum and minimum temperature, and it also require the dates to do the calculation. So, the example will require two calls for Start() and the parameter use_attributes.

When running Compute, a warning appears indicating that the names of the use of attributes didn't match with the names of the input data:

5: In multiApply::Apply(data, target_dims = attr(step_fun, "TargetDims"),  :
  Parameter 'use_attributes' provided with names, but no names provided for 'data'. All names will be disregarded.

However, I was providing the same names. I think that the parameter 'cube_headers' had the names when function ByChunks() starts running, but later they aren't passed to 'data' in the call of Apply.

The solution I propose in this branch solve the problem in the example I did. See the exemple in the file /esarchive/scratch/nperez/git/Flor/ClimProjDiags_Tests/DTRRef_Ex_Start.R

Could you consider this fix or improving it?

Thanks!

Núria

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: develop-InputnNames