merge_across_dims_narm=TRUE does not remove NA values
I'm trying to load EC-Earth3-i2 decadal predictions, which are organised as follows: since this model is initialised in November, the first two lead months (Nov and Dec) are stored in the first file, and the rest of the lead months are stored in files with one calendar year each (from Jan to Dec). Please see, for example, this folder: "/esarchive/exp/CMIP6/dcppA-hindcast/EC-Earth3/DCPP/EC-Earth-Consortium/EC-Earth3/dcppA-hindcast/r6i2p1f1/Amon/psl/gr/v20210309/".
To do so, I'm using the "merge_across_dims_narm" parameter in Start(), but both "merge_across_dims_narm=TRUE" and "merge_across_dims_narm=FALSE" return the same dimensions (and the 10 missing values corresponding to the first file are not removed).
This is the code I am using:
library(startR)
narmTRUE <- startR::Start(dataset = '/esarchive/exp/CMIP6/dcppA-hindcast/EC-Earth3/DCPP/EC-Earth-Consortium/EC-Earth3/dcppA-hindcast/$member$/Amon/$var$/gr/v20210309/$var$_Amon_EC-Earth3_dcppA-hindcast_s$sdate$-$member$_gr_$fyear$.nc',
var = 'psl',
sdate = paste0(1970:1972),
lat = indices(1),
lon = indices(1),
fyear = 'all',
fmonth = 'all',
fyear_depends = 'sdate',
member = 'r6i2p1f1',
fmonth_across = 'fyear',
merge_across_dims = TRUE,
merge_across_dims_narm = TRUE,
largest_dims_length = c(fmonth = 12),
synonims = list(fmonth = c('fmonth','time'), lon = c('lon', 'longitude'), lat = c('lat', 'latitude')),
return_vars = list(lat = 'dataset', lon = 'dataset'),
num_procs = 1 , retrieve = TRUE)
narmFALSE <- startR::Start(dataset = '/esarchive/exp/CMIP6/dcppA-hindcast/EC-Earth3/DCPP/EC-Earth-Consortium/EC-Earth3/dcppA-hindcast/$member$/Amon/$var$/gr/v20210309/$var$_Amon_EC-Earth3_dcppA-hindcast_s$sdate$-$member$_gr_$fyear$.nc',
var = 'psl',
sdate = paste0(1970:1972),
lat = indices(1),
lon = indices(1),
fyear = 'all',
fmonth = 'all',
fyear_depends = 'sdate',
member = 'r6i2p1f1',
fmonth_across = 'fyear',
merge_across_dims = TRUE,
merge_across_dims_narm = FALSE,
largest_dims_length = c(fmonth = 12),
synonims = list(fmonth = c('fmonth','time'), lon = c('lon', 'longitude'), lat = c('lat', 'latitude')),
return_vars = list(lat = 'dataset', lon = 'dataset'),
num_procs = 1 , retrieve = TRUE)
dim(narmTRUE)
dim(narmFALSE)
Could you please have a look at it and let me know if I am making any mistakes?
Thanks a lot,
Carlos