Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • CSTools CSTools
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 28
    • Issues 28
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • External
  • CSToolsCSTools
  • Merge requests
  • !121

Develop s2dv cube namedims

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Eva Rifà requested to merge develop-s2dv_cube-namedims into master Sep 16, 2022
  • Overview 0
  • Commits 2
  • Pipelines 1
  • Changes 1

Added some checks into the function s2dv_cube.R to check if lon and lat parameters have dimension names. If they don't have named dimension it adds a name of the corresponding dimension in data. A part from the checks commented above, the function also will return error if lon vector is provided but data doesn't have longitudinal dimension. In the case that longitudinal dimension is not lon or longitude but it has the same name and same length of the lon vector it returns only a warning. While in the case parameter lon doesn't have dimension name it returns an error. The same development is done for latitude.

The conditionals are organized by the following:

  1. The first condition checks if data dimensions contain either lon or longitude. Then if the length or the dimension name of lon vector are not consistent with longitudinal dimension of data it returns an error.

  2. If the first condition is FALSE, then there is the second condition. Here, it checks if lon vector has dimension name and if this name is inside data dimensions. Then, if the length of lon vector and longitudinal dimension are the same it returns a warning notifying that the name is not expected by s2dv_cube. In the case longitudes are different, it returns an error.

  3. If neither condition 1 nor 2 are TRUE it returns an error.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: develop-s2dv_cube-namedims