Metadata doesn't reshape when the file dim needs to split
The metadata isn't not reshaped correctly when the file dim is the one to be split and this file dim is from which the inner dim metadata comes.
Minimal example:
file_date <- array(c(paste0(1993:1995, '07'), paste0(1993:1995, '08')),
dim = c(syear = 3, smonth = 2))
data <- Start(dat = paste0('/esarchive/recon/ecmwf/erainterim/6hourly/',
'$var$/$var$_$file_date$.nc'),
var = 'tas',
file_date = file_date, #[syear = 3, smonth = 2]
time = indices(1:2),
latitude = indices(1),
longitude = indices(1),
split_multiselected_dims = TRUE,
return_vars = list(latitude = NULL,
longitude = NULL,
time = 'file_date'),
retrieve = TRUE)
dim(data)
dat var syear smonth time latitude longitude
1 1 3 2 2 1 1
dates <- attr(data,'Variables')$common[['time']]
dim(dates) #WRONG
file_date time
6 2
The dates dimension should be [syear = 3, smonth = 2, time = 2]
FYI @vagudets I'll try to fix this asap so you can use this function in your auto-s2s script.
An-Chi