data_exp <- Start(dat = path_test,
                  var = var_test,
                  member = indices(1:25),
                  time = indices(1:7),
                  sdate = c('19931101', '19941101'),
                  latitude = values(list(42, 65)),
                  longitude = values(list(0, 18)),
                  longitude_reorder = CircularSort(0, 360),
                  synonims = list(latitude=c('lat','latitude'),
                                  longitude=c('lon','longitude'),
                                  member=c('ensemble','realization')),
                  return_vars = list(latitude = 'dat',
                                     longitude = 'dat',
                                     time = 'dat'),
                  retrieve = F)
atomic_x <- function(x, t) {
  object <- s2dv::MeanDims(x, dims = c('dat', 'time'))
  return(object)
}
step <- Step(fun = atomic_x,
             target_dims = target_test,
             output_dims = output_test)

wf <- AddStep(list(data_exp), step, t = 1)
res <- Compute(wf,
               chunks = list(latitude = 4,
                             longitude = 3),
               threads_load = threads_test,
               threads_compute = 12,
               cluster = list(queue_host = queue_host,
                              queue_type = 'lsf',
                              cores_per_job = 12,
                              job_wallclock = '02:00',
                              temp_dir = temp_dir,
                              polling_period = 10,
                              max_jobs = 12,
                              bidirectional = FALSE),
               ecflow_suite_dir = ecflow_suite_dir,
               wait = TRUE)

