Skip to content
GitLab
Projects Groups Topics 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
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 29
    • Issues 29
    • 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 SciencesEarth Sciences
  • startRstartR
  • Issues
  • #209
Closed
Open
Issue created Apr 29, 2025 by vagudets@vagudetsMaintainer

Start() fails when evaluating condition in inner dimension check

The "Not all the inner dims are defined in Start() call" check is supposed to raise an informative error if there are dimensions in the file that are not defined in the Start() call. However, this check only works if there is one undefined inner dim, and it fails when there are two or more undefined inner dims:

Error in if (data_dims[tmp] != 1) { : the condition has length > 1

This is because data_dims[tmp] is of length > 1 in that case and cannot be evaluated to a single value. The condition should be improved to consider this case.

Reproducible example:

path <- "/gpfs/projects/bsc32/esarchive_cache/exp/ecmwf/system51c3s/constant/sftof/$var$.nc"
data <- startR::Start(dat = path, 
                      var = "sftof", 
                      lon = values(list(200, 201)),
                      lat = values(list(-50.5, -60.5)),
                      return_vars = list(lat = NULL, lon = NULL), 
                      synonims = list(lon = c('lon','longitude'),
                                      lat = c('lat','latitude')),
                      lat_reorder = Sort(decreasing = TRUE),
                      lon_reorder = CircularSort(0, 360),
                      num_procs = 1, retrieve = TRUE)

Victòria

Edited Apr 29, 2025 by vagudets
Assignee
Assign to
Time tracking