Due to the usage within the Climate Services Verification Suite there was the need of some improvements:
-
When the filename is taken from Dates, the format has been corrected to:
<var_name>_YYYYmmdd.nc
. Before, if the Dates had time values included, they were included in the filename, which was not correct. -
If Dates array has more dimensions additionally to
sdate_dim
andftime_dim
but they are of length 1, they are dropped. -
Some Warnings are also improved:
-
"Parameter 'startdates' should be a character string containing the start dates in the format 'yyyy-mm-dd', 'yyyymmdd', 'yyyymm', 'POSIXct' or 'Dates' class."
to"Parameter 'startdates' should be a character string containing the start dates in the format 'yyyy-mm-dd', 'yyyymmdd', 'yyyymm', 'POSIXct' or 'Dates' class. Files will be named with Dates instead."
. and -
"Spatial coordinate names do not match any of the names accepted by the package."
to"Spatial coordinates not found."
. - The warning:
Detected unknown dimension: region, sday, sweek
has been removed.
-
@nperez Could you run your code with this development? You can source the function here: https://earth.bsc.es/gitlab/external/cstools/-/raw/develop-CST_SaveExp_sdates.nc/R/CST_SaveExp.R
Thanks!