Problem when Step receives NULL as target dims
Using develop-chunking, I encounter this problem.
See
repos <- paste0('/esnas/exp/ecmwf/system4_m1/6hourly/',
'$var$/$var$_$sdate$.nc')
system4 <- Start(dat = repos,
var = 'sfcWind',
#sdate = paste0(1981:2015, '1101'),
sdate = paste0(1981:1984, '1101'),
#time = indices((30*4+1):(120*4)),
time = indices((30*4+1):(30*4+4)),
ensemble = 'all',
#ensemble = indices(1:6),
#latitude = 'all',
latitude = indices(1:10),
#longitude = 'all',
longitude = indices(1:10),
return_vars = list(latitude = NULL,
longitude = NULL,
time = c('sdate')))
repos <- paste0('/esnas/recon/ecmwf/erainterim/6hourly/',
'$var$/$var$_$file_date$.nc')
dates <- attr(system4, 'Variables')$common$time
dates_file <- sort(unique(gsub('-', '', sapply(as.character(dates), substr, 1, 7))))
erai <- Start(dat = repos,
var = 'sfcWind',
file_date = dates_file,
time = values(dates),
#latitude = 'all',
latitude = indices(1:10),
#longitude = 'all',
longitude = indices(1:10),
time_var = 'time',
time_tolerance = as.difftime(1, units = 'hours'),
time_across = 'file_date',
return_vars = list(latitude = NULL,
longitude = NULL,
time = 'file_date'),
merge_across_dims = TRUE,
split_multiselected_dims = TRUE)
ratio <- Start(dat = '/esnas/scratch/llledo/GWA_correction/GWA_$var$_file.nc',
var = 'ratio',
# latitude = 'all',
# longitude= 'all',
latitude = indices(1:10),
longitude = indices(1:10),
return_vars = list(latitude = NULL,
longitude = NULL))
####################
# Prepare and launch by_chunk
####################
step <- Step(eqmcv_atomic,
list(a = c('ensemble', 'sdate','time'),
b = c('sdate','time'),
c = NULL ),
# c = c('dat') fixes the bug
list(d = c('ensemble','pc')))
res <- Compute(step, list(system4, erai, ratio),
pc_list, wind2CF,
chunks = list(latitude = 5,
longitude = 5),
ncores=4,
#cluster = list(queue_host = 'bsceslogin01.bsc.es',
# max_jobs = 4,
# cores_per_job = 2),
#shared_dir = '/esnas/scratch/llledo/test_bychunk',
wait = FALSE)