diff --git a/NEWS.md b/NEWS.md index 090aa077eb00ecdba2613f6f86737519d78ba59a..d21702a5ff08aeada6a6eabd59286057eaef1c67 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,7 @@ + PlotForecastPDF vignette displays figures correctly + Calibration function is exposed to users + MultiMetric vignette fixed typo text description + + RainFARM checks 'slope' is not a vector ### CSTools 3.0.0 diff --git a/R/CST_RainFARM.R b/R/CST_RainFARM.R index ff4d624dc7fa6f8f12f4183332bd4b79ba89f601..49065a974711aa9732778ee46e8ca9717ee667b9 100644 --- a/R/CST_RainFARM.R +++ b/R/CST_RainFARM.R @@ -237,6 +237,12 @@ RainFARM <- function(data, lon, lat, nf, weights = 1., nens = 1, } warning(paste("Selected time dim:", time_dim)) } + # Check if slope is an array + if (length(slope) > 1) { + warning("Parameter 'slope' has length > 1 and only the first ", + "element will be used.") + slope <- as.numeric(slope[1]) + } # Perform common calls r <- lon_lat_fine(lon, lat, nf)