Start() doesn't interpolate if lat='all' , lon='all'
I'm trying to interpolate with Start() using lat='all'
and lon='all'
, but it returns the original dimensions. It happens for both retrieve=TRUE
and retrieve=FALSE
. The interpolation is done (I can see some warnings that arise during the interpolation), but the returned array has the original dimensions.
not_working <- startR::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_$fyear$.nc',
var = 'tos',
sdate = paste0(1960:1961),
fmonth = 'all',
lat = 'all',
lon = 'all',
fyear = indices(1),
member = 'all',
fyear_depends = 'sdate',
fmonth_across = 'fyear',
merge_across_dims = TRUE,
transform = CDORemapper, transform_extra_cells = 2, transform_params = list(grid = 'r120x60', method = 'conservative', crop = FALSE), transform_vars = c('lat','lon'),
synonims = list(fmonth = c('fmonth','time'), lon = c('lon', 'longitude'), lat = c('lat', 'latitude')),
return_vars = list(lat = 'dataset', lon = 'dataset'),
lat_reorder = Sort(decreasing = F),
lon_reorder = CircularSort(0, 360),
num_procs = 1 , retrieve = FALSE)
It works if you select the latitudes and longitudes with values():
working <- startR::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_$fyear$.nc',
var = 'tos',
sdate = paste0(1960:1961),
fmonth = 'all',
lat = values(list(-90,90)),
lon = values(list(0,359.9)),
fyear = indices(1),
member = 'all',
fyear_depends = 'sdate',
fmonth_across = 'fyear',
merge_across_dims = TRUE,
transform = CDORemapper, transform_extra_cells = 2, transform_params = list(grid = 'r120x60', method = 'conservative', crop = FALSE), transform_vars = c('lat','lon'),
synonims = list(fmonth = c('fmonth','time'), lon = c('lon', 'longitude'), lat = c('lat', 'latitude')),
return_vars = list(lat = 'dataset', lon = 'dataset'),
lat_reorder = Sort(decreasing = F),
lon_reorder = CircularSort(0, 360),
num_procs = 1 , retrieve = FALSE)
I can work with the second option without any problem, so I'm opening this issue just for your information.
Thank you,
Carlos