Skip to content

CST_PeriodAccumulation duplicated time dimensio

Hi @vagudets @tkariyat

I'm trying to compute the spei using the functions included in CSIndicators. I've a problem with the CST_PeriodAccumulation function. It provides an array with the 'time' dimension duplicated. You can see the example below.

# Input
dim(data_obs_diff$data)
dat       var      sday     sweek     syear      time  latitude longitude 
1         1         1         1         5         3        49        61 
ensemble 
1 

# Accumulation
data_obs_accum <- CST_PeriodAccumulation(
  data = data_obs_diff,
  rollwidth = 3,
  sdate_dim = "syear",
  ncores = 1)

# Output
dim(data_obs_accum$data)
dat       var      sday     sweek     syear      time  latitude longitude 
1         1         1         1         5         3        49        61 
ensemble  time 
1          1

Do you think this can be fixed?

Thanks,

Vero