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
  • #51
Closed
Open
Issue created Mar 03, 2020 by Carlos Delgado Torres@cdelgadoMaintainer

Dimensions provided by Start() and Compute() do not match

Hi @nperez and @aho,

I'm trying to interpolate when loading the data with the Start() and Compute () functions, and the discovered data dimensions by Start() do not match with those returned by Compute().

Here is an example of the code I'm using to load and interpolate the data:

library(startR)
library(s2dverification)

data = Start(dataset = '/esarchive/exp/ecearth/a1ua/cmorfiles/DCPP/EC-Earth-Consortium/EC-Earth3/dcppA-hindcast/$member$/Amon/$var$/gr/v20190713/$var$_Amon_*_s$sdate$-$member$_gr_$leadyear$.nc',
             var = 'tas',
             sdate = paste0(2000:2004),
             month = 'all',
             lat = values(list(0,14)),
             lon = values(list(0,28)),
             leadyear = 'all',
             member = 1:4,
             leadyear_depends = 'sdate',
             month_across = 'leadyear',
             synonims = list(month = c('month','time'), lon = c('lon', 'longitude'), lat = c('lat', 'latitude')),
             transform = CDORemapper,
             transform_extra_cells = 2,
             transform_params = list(grid = 'r200x100',
                                     # grid = '/esarchive/recon/jma/jra55/monthly_mean/tas_f6h/tas_198001.nc',
                                     method = 'con', crop = c(0,28,0,14)),
             transform_vars = c('lat', 'lon'),
             return_vars = list(lat = 'dataset', lon = 'dataset'),
             lat_reorder = Sort(),
             lon_reorder = CircularSort(-180, 180),
             num_procs = 1, retrieve = FALSE)

fun = function(exp){
  return(exp)
}

step <- Step(fun = fun,
             use_libraries = c('s2dverification'),
             target_dims = c('lat','lon'),
             output_dims = c('lat','lon'))

wf <- AddStep(inputs = data,
              step = step)

res <- Compute(workflow = wf,
               chunks = list(member = 4, month = 6),
               threads_load = 2,
               threads_compute = 4)

The dimensions given by Start() are:

> attr(data,'Dimensions')
 dataset      var    sdate    month      lat      lon leadyear   member 
       1        1        5       12        8       16       11        4

and by Compute() are:

> dim(res$output1)
     lat      lon  dataset      var    sdate    month leadyear   member 
       8       16        1        1        5       72        3        4 

Could you please have a look?

Thanks,

Carlos

Assignee
Assign to
Time tracking