Start(): variable attributes cannot be retrieved if the number of variable is more than one
When Start() retrieves more than one variable, the attributes of the second and following variables cannot be retrieved. If
retrieve = TRUE, the first variable attributes is saved. But if
retrieve = FALSE, none of the variables is saved.
repos <- paste0('/esarchive/exp/ecearth/a1tr/cmorfiles/CMIP/EC-Earth-Consortium/EC-Earth3/historical/', 'r24i1p1f1/Amon/$var$/gr/v20190312/$var$_Amon_EC-Earth3_historical_r24i1p1f1_gr_185001-185012.nc') var <- c('tas', 'clt') sdate <- '20170101' data <- Start(dat = repos, var = var, time = 'all', lat = 'all', lon = 'all', return_vars = list(lat = NULL, lon = NULL), synonims = list(lat = c('lat','latitude'), lon = c('lon','longitude')), retrieve = TRUE ) dim(data) str(data)
It causes problems when trying to get the units from each variable.
Note: May be related to NcVarReader.R. Look for 'var_to_read' in Start.R