library(startR)
repos <- paste0('/esarchive/exp/ecmwf/system4_m1/6hourly/',
                  '$var$/$var$_$sdate$.nc')
  
data1 <- Start(dat = repos,
               var = 'tas',
               sdate = sapply(1994, function(x) paste0(x, sprintf('%02d', 5:12), '01')),
               time = indices(seq(1, 124, 4)),  #first time step per day
               ensemble = 'all',
               latitude = indices(1:10),
               longitude = indices(1:10),
               return_vars = list(latitude = NULL,
                                  longitude = NULL,
                                  time = c('sdate')))
> attributes(data1)$Dimensions
      dat       var     sdate      time  ensemble  latitude longitude 
        1         1         8        31        51        10        10 

data2 <- Start(dat = repos,
               var = 'tas',
               sdate = sapply(1994, function(x) paste0(x, sprintf('%02d', 5:12), '01')),
               time = indices(1:124),  #first time step per day
               ensemble = 'all',
               latitude = indices(1:10),
               longitude = indices(1:10),
               return_vars = list(latitude = NULL,
                                  longitude = NULL,
                                  time = c('sdate')))
> attributes(data2)$Dimensions
      dat       var     sdate      time  ensemble  latitude longitude 
        1         1         8       124        51        10        10 

dates <- attr(data2, 'Variables')$common$time

data3 <- Start(dat = repos,
               var = 'tas',
               sdate = sapply(1994, function(x) paste0(x, sprintf('%02d', 5:12), '01')),
               hour = values(dates),  #first time step per day
               hour_var = 'time',
               day = sapply(1:4, function(x) dates[seq(1, length(dates), 4)]),
               ensemble = 'all',
               latitude = indices(1:10),
               longitude = indices(1:10),
               return_vars = list(latitude = NULL,
                                  longitude = NULL,
                                  time = 'hour'))


data4 <- Start(dat = repos,
               var = 'tas',
               sdate = sapply(1994, function(x) paste0(x, sprintf('%02d', 5:12), '01')),
               time = values(dates),  #first time step per day
               transform = seq(),
               transform_vars = 'time',
               transform_parms = list(from = 
               ensemble = 'all',
               latitude = indices(1:10),
               longitude = indices(1:10),
               return_vars = list(latitude = NULL,
                                  longitude = NULL,
                                  time = 'NULL'))
