Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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 26
    • Issues 26
    • 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
  • Issues
  • #122

Closed
Open
Created Dec 01, 2021 by aho@ahoMaintainer

Start(): Error when $var$ is not used in path

The wildcard $var$ is necessary to used in the path. It is a special one that serves as both file dim and inner dim. If it is not used, Start() may return errors (but not for all the cases.) See more explanation in practical guide.

Here is an example script that return the error:

Error in FUN(X[[i]], ...) : Could not find dimension 'time' (or its synonims if specified) in the file /esarchive/exp/ecmwf/system5c3s/monthly_mean/tas_f6h/tas_19960501.nc

hcst.path <- "/esarchive/exp/ecmwf/system5c3s/monthly_mean/tas_f6h/tas_$syear$.nc"  # change tas to $var$ solve the problem
variable <- "tas"
hcst.sdates <- paste0(1993:2016,"0501")
dim(hcst.sdates) <- list(syear=length(hcst.sdates))
longitude_reorder = CircularSort(0, 361)
latitude_reorder = Sort(decreasing=TRUE)

data <- Start(dat = hcst.path,
              var = variable,
              syear = hcst.sdates,
              time = indices(1:6),
              latitude = values(list(-40, 10)),
              latitude_reorder = latitude_reorder,
              longitude = values(list(0, 60)),
              longitude_reorder = longitude_reorder,
              synonims = list(latitude=c('lat','latitude'),
                              longitude=c('lon','longitude'),
                              member=c('ensemble')), 
              member = indices(1:25),
              return_vars = list(latitude = 'dat',
                                 longitude = 'dat',
                                 time = c('syear')),
              split_multiselected_dims = FALSE,
              retrieve = T)

issue #80 (closed) was also caused by the missing $var$, while the error message is different.

TODO: (1) Test different cases to see if the problematic parts differ. (2) Add a check for the existence of $var$, if not, return an error.

Assignee
Assign to
Time tracking