From 1e350374ddc2f53fd0679b3a06b12e1877f0e9e8 Mon Sep 17 00:00:00 2001 From: jhardenberg Date: Tue, 3 Dec 2019 18:25:24 +0100 Subject: [PATCH 1/2] check slope is not a vector --- R/CST_RainFARM.R | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/R/CST_RainFARM.R b/R/CST_RainFARM.R index ff4d624d..49065a97 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) -- GitLab From 8afcbe6a44c559fb697825b890cc8e1f93f41990 Mon Sep 17 00:00:00 2001 From: nperez Date: Wed, 3 Jun 2020 17:52:45 +0200 Subject: [PATCH 2/2] RainFARM fix listed in NEWS --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 090aa077..d21702a5 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 -- GitLab