splitting multiple dimensions in Start Call
Hi @aho,
I have this start call that loads daily data, my initial code used indices to load the correct times, but I prefer to pass dates and to do so I need to add a multidimensional array with the corresponding date for each sdate. The problem I'm facing is that I also need to use a multidimensional array to define the sdates in the subseasonal case. You already explained me that the current version of startR is only capable of splitting one dimension, so I create this issue to explore in the future the capability of splitting multiple dimensions.
Below you can see an use case to test this:
##############################################################################################
## Time and sdate are defined using multidimensional arrays
## DOES NOT WORK
##############################################################################################
sdates <- array(c("20010501","20020501","20030501"),
dim = c(sday = 1, sdate = 3))
times <- array(ymd("20010501") + days(0:30) + rep(years(0:2), each = 31),
dim = c(time = 31, sdate = 3, sday = 1))
##############################################################################################
## Only Time is defined using multidimensional arrays
## DOES WORK
##############################################################################################
sdates <- c("20010501","20020501","20030501")
times <- array(ymd("20010501") + days(0:30) + rep(years(0:2), each = 31),
dim = c(time = 31, file_date = 3))
times <- as.POSIXct(times*86400, tz = 'UTC',
origin = '1970-01-01')
hcst <- Start(dat = "/esarchive/exp/ecmwf/system5c3s/daily_mean/$var$_f6h/$var$_$file_date$.nc",
var = "tas",
file_date = sdates,
time = times,
latitude = values(list(40, 48)),
latitude_reorder = Sort(),
longitude = values(list(10, 20)),
longitude_reorder = circularsort,
ensemble = indices(1:10),
return_vars = list(latitude = 'dat',
longitude = 'dat',
time = 'file_date'),
split_multiselected_dims = TRUE,
retrieve = TRUE)
Thanks in advance,