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
  • #139
Closed
Open
Issue created Mar 17, 2022 by aho@ahoMaintainer

Metadata doesn't reshape when the file dim needs to split

The metadata isn't not reshaped correctly when the file dim is the one to be split and this file dim is from which the inner dim metadata comes.

Minimal example:

file_date <- array(c(paste0(1993:1995, '07'), paste0(1993:1995, '08')),
                   dim = c(syear = 3, smonth = 2))

data <- Start(dat = paste0('/esarchive/recon/ecmwf/erainterim/6hourly/',
                             '$var$/$var$_$file_date$.nc'),
                var = 'tas',
                file_date = file_date, #[syear = 3, smonth = 2]
                time = indices(1:2),
                latitude = indices(1),
                longitude = indices(1),
                split_multiselected_dims = TRUE,
                return_vars = list(latitude = NULL,
                                   longitude = NULL,
                                   time = 'file_date'),
                retrieve = TRUE)
dim(data)
      dat       var     syear    smonth      time  latitude longitude 
        1         1         3         2         2         1         1 

dates <- attr(data,'Variables')$common[['time']]
dim(dates) #WRONG
file_date      time 
        6         2

The dates dimension should be [syear = 3, smonth = 2, time = 2]

FYI @vagudets I'll try to fix this asap so you can use this function in your auto-s2s script.

An-Chi

Assignee
Assign to
Time tracking