setwd("/esnas/scratch/ruben/a0pe/scripts")
library(s2dverification)
library(abind)
library(startR)

path_ICE = '/esarchive/exp/ecearth/a1q0/daily_mean/$var$_f6h/$var$_day_EC-Earth3-LR_historical_S$sdate$_$member$_$chunk$.nc'

lst_var = c('siextentn')
lst_exp = c('a1q0') 
lst_months = c('may_ini') 
  
    for (start_month in lst_months) {
    start_dates = switch(start_month, 'may_ini'= paste(seq(1993, 1994, 1),'0501', sep=''), 
                           'nov_ini' = paste(seq(1993, 2014, 1),'1101', sep='')) 
}      
      
      lst_regions <- c('TotalArc')
      
          Data_EXP <- Start(dataset = path_ICE,
                            region = c(lst_regions), 
                            region_var = 'region',
                            var = lst_var, 
                            member = 'all', 
                            sdate = start_dates,
                            time = 'all',
                            chunk = 'all', 
                            chunk_depends = 'sdate', 
                            time_across = 'chunk',
                            return_vars = list(region = NULL))

