From 34c4fe189a282de5409b1217aa3fa9e925e06118 Mon Sep 17 00:00:00 2001 From: Delaigue Olivier <olivier.delaigue@irstea.priv> Date: Wed, 29 Aug 2018 13:40:13 +0200 Subject: [PATCH] v1.0.12.5 CreateCalibOptions returns an error when all the parameters ar set --- DESCRIPTION | 2 +- NEWS.rmd | 6 ++++-- R/CreateCalibOptions.R | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3f756371..4fbef564 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.0.12.4 +Version: 1.0.12.5 Date: 2018-08-29 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.rmd b/NEWS.rmd index f6603dfe..eec23539 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -14,7 +14,7 @@ output: -### 1.0.12.4 Release Notes (2018-08-29) +### 5 Release Notes (2018-08-29) #### Deprectated and defunct @@ -26,7 +26,9 @@ output: - <code>PEdaily_Oudin()</code> now presents a <code>LatUnit</code> argument which allows to chose the unit of the latitude between radians and degrees. -- <code>Calibration_Michel()</code> is now faster during the grid-screening step when a parameter is set using <code>FixedParam</code> in <code>CreateCalibOptions</code>. +- <code>Calibration_Michel()</code> is now faster during the grid-screening step when a parameter is set using <code>FixedParam</code> in <code>CreateCalibOptions()</code>. + +- <code>CreateCalibOptions()</code> now returns an error when all the parameters ar set in <code>FixedParam</code>. #### Minor user-visible changes diff --git a/R/CreateCalibOptions.R b/R/CreateCalibOptions.R index a0c20e65..149e5ba4 100644 --- a/R/CreateCalibOptions.R +++ b/R/CreateCalibOptions.R @@ -178,6 +178,10 @@ CreateCalibOptions <- stop("Incompatibility between FixedParam length and FUN_MOD \n") return(NULL) } + if (!all(is.na(FixedParam))) { + stop("At least one parameter must be not set (NA) \n") + return(NULL) + } } ##check_SearchRanges -- GitLab