# Function created in S2S$E-backend. Copied from:
# https://earth.bsc.es/gitlab/es/S2S4E-backend-BSC/-/blob/master/data-analysis/SEAS5/seas5.load.R
add_dims <- function(data){
  default_dims <- c(sdate_hcst_1 = 1, sdate_hcst_2 = 1, sdate_hcst_year = length(data))
  default_dims[names(dim(data))] <- dim(data)
  dim(data) <- default_dims
  return(data)
 }

