Error in CST_Analog vignette
The code doesn't work well in Analogs_vignette.Rmd https://earth.bsc.es/gitlab/external/cstools/-/blob/master/vignettes/Analogs_vignette.Rmd
down <- CST_Analogs(expL = lonlat_data$exp, obsL = lonlat_data$obs)
Error in (function (expL, obsL, time_expL, excludeTime = NULL, obsVar = NULL, : Parameter 'time_obsL' can not be length 0
The error comes from .analogs()
line 807. time_obsL
has value at the beginning in Analogs().
down <- CST_Analogs(expL = lonlat_data$exp, obsL = lonlat_data$obs,
nAnalogs = 2, AnalogsInfo = TRUE)
returns the same error.
The problem is that expL and obsL have the same sdates. And at line747 and 760, time_obsL becomes empty because all the dates are excluded.
The function always works like this, so it's weird that the vignette worked before.