library(startR)
lonmin.atl3 <- -20;
lonmax.atl3 <-   0;
latmin.atl3 <-  -3; 
latmax.atl3 <-   3 
  
#Load data
repos.a0r2 <- paste0('/esarchive/exp/ecearth/a0r2/monthly_mean/tos-ifs_f3h/',
                    '$var$','_Omon_EC-EARTH3_TAUEQ_S$sdate$','_$ens$_$sdate1$-$sdate2$.nc')

data.a0r2 <- Start(dat  = repos.a0r2,
              var       = 'tos',
              time      = 'all',
              sdate     = paste0(c(1981:1982), '0601'),
              sdate1    = paste0(c(1981:1982), '06'),
              sdate2    = paste0(c(1982:1983),'01'),
              ens       = paste0('r', 1:10, 'i1p1'),
	      latitude = values(list(latmin.atl3, latmax.atl3)), 
	      longitude = values(list(lonmin.atl3, lonmax.atl3)), 
	      latitude_reorder = Sort(),
              synonims  = list(latitude = c('lat'), longitude = c('lon')),
              return_vars = list(lon = NULL,
                                 lat = NULL,
                                 time = 'sdate'),
              retrieve = F)
