library(startR)
library(profvis)

profvis({
path <- '/esarchive/exp/monarch/t0kc/regional/3hourly/'
vars <- list.files(path)

path <- list(list(name = 'raw', 
                  path = paste0(path, '$var$/$var$-$member$_$date$03.nc')),
             list(name = 'ana',
                  path = paste0(path, '$var$/$var$-$member$_$date$03_an.nc')))
date <- '20131221'
startR:::.warning("Data reading...")
#for (variable in vars) {
variable = vars[1]
data <- Start(dat = path[[1]],
              var = variable,
              date = date,
              member = indices(1:2),#'all',
              time = 'all',
              lev = indices(1:2), #'all',
              rlat = 'all',
              rlon = 'all',
              retrieve = TRUE, num_procs = 1)
})
