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 28
    • Issues 28
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • 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
  • #74
Closed
Open
Issue created Oct 08, 2020 by aho@ahoMaintainer

Metadata retrieval problem when one dataset does not exist

This issue is related to #66 (closed). The fix in issue 66 corrected the metadata reading when datasets > 1. However, if one dataset does not contain any valid files, the metadata retrieval has problems. Before this fix, Start() can still retrieve the data (with incorrect metadata) and the missing file dataset will be filled with NAs.

 repos <- "/esarchive/exp/ecmwf/system5_m1/monthly_mean/$var$_f6h/$var$_$sdate$.nc"
 # incorrect path. Therefore repos2 doesn't have any valid files 
 repos2 <- "/esarchive/exp/ecmwf/system4_m1/monthly_mean/$var$_f2h/$var$_$sdate$.nc"  # correct one is _f6h
  var <- 'tas'

  data <- Start(dat = list(list(name = 'system4_m1', path = repos2),
                           list(name = 'system5_m1', path = repos)),
                var = var,
                sdate = '20170101',
                ensemble = indices(1),
                time = indices(1),
                lat = 'all',
                lon = 'all',
                synonims = list(lat = c('lat', 'latitude'),
                                lon = c('lon', 'longitude')),
                return_vars = list(time = 'sdate',
                                   longitude = 'dat',
                                   latitude = 'dat'),
                metadata_dims = 'dat',  # it can be omitted since it is automatically specified as 'dat'
                retrieve = T
               )

Error in loaded_metadata[[loaded_metadata_count]] : subscript out of bounds

Assignee
Assign to
Time tracking