From 705dae5d01438f1241bec438030d60c82a7f0109 Mon Sep 17 00:00:00 2001
From: Delaigue Olivier <olivier.delaigue@irstea.priv>
Date: Fri, 28 Feb 2020 10:35:26 +0100
Subject: [PATCH] v1.5.0.0 BUG: CReatInputsCrit can use RunOptions objects of
 class "LibMod"

---
 DESCRIPTION          | 4 ++--
 NEWS.md              | 6 +++++-
 R/CreateInputsCrit.R | 2 +-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index c681d3e4..2011cc83 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
 Package: airGR
 Type: Package
 Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
-Version: 1.4.3.63
-Date: 2020-02-26
+Version: 1.5.0.0
+Date: 2020-02-28
 Authors@R: c(
   person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
   person("Olivier", "Delaigue", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7668-8468"), email = "airGR@inrae.fr"),
diff --git a/NEWS.md b/NEWS.md
index afd354fe..bc09e01e 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -4,7 +4,11 @@
 
 
 
-### 1.4.3.63 Release Notes (2020-02-26)
+### 1.5.0.0 Release Notes (2020-02-28)
+
+#### Minor user-visible changes
+
+- Codedaptations to make the package compatible with airGRplus.
 
 ____________________________________________________________________________________
 
diff --git a/R/CreateInputsCrit.R b/R/CreateInputsCrit.R
index 4f314eae..9f797d1d 100644
--- a/R/CreateInputsCrit.R
+++ b/R/CreateInputsCrit.R
@@ -107,7 +107,7 @@ CreateInputsCrit <- function(FUN_CRIT,
   
   
   ## check 'VarObs' + 'RunOptions'
-  if ("Q" %in% VarObs & !inherits(RunOptions, "GR")) {
+  if ("Q" %in% VarObs & !inherits(RunOptions, c("GR", "LibMod"))) {
     stop("'VarObs' cannot contain Q if a GR rainfall-runoff model is not used")
   }
   if (any(c("SCA", "SWE") %in% VarObs) & !inherits(RunOptions, "CemaNeige")) {
-- 
GitLab