From a94390b3876db2e3eadcbec024ac175428dd6db2 Mon Sep 17 00:00:00 2001
From: Delaigue Olivier <olivier.delaigue@irstea.fr>
Date: Fri, 6 Nov 2020 11:24:48 +0100
Subject: [PATCH] v1.6.3.26 refactor(R): remove GR1A R code; now Fortran cod is
 used Refs #65

---
 DESCRIPTION       |  4 ++--
 NEWS.md           |  2 +-
 R/RunModel_GR1A.R | 13 -------------
 3 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 449f047a..3e643917 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.6.3.25
-Date: 2020-11-05
+Version: 1.6.3.26
+Date: 2020-11-06
 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 d5a8a938..3030333b 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -4,7 +4,7 @@
 
 
 
-### 1.6.3.25 Release Notes (2020-11-06)
+### 1.6.3.26 Release Notes (2020-11-06)
 
 #### New features
 
diff --git a/R/RunModel_GR1A.R b/R/RunModel_GR1A.R
index 98cb5ec9..aa81ee64 100644
--- a/R/RunModel_GR1A.R
+++ b/R/RunModel_GR1A.R
@@ -25,7 +25,6 @@ RunModel_GR1A <- function(InputsModel,RunOptions,Param){
       ExportDatesR   <- "DatesR"   %in% RunOptions$Outputs_Sim;
       ExportStateEnd <- "StateEnd" %in% RunOptions$Outputs_Sim;
     
-    BOOL_Fortran <- FALSE; if(BOOL_Fortran){
     ##Call_fortan
       RESULTS <- .Fortran("frun_gr1a",PACKAGE="airGR",
                  ##inputs
@@ -45,18 +44,6 @@ RunModel_GR1A <- function(InputsModel,RunOptions,Param){
       RESULTS$Outputs[ round(RESULTS$Outputs ,3)==(-999.999)] <- NA;
       RESULTS$StateEnd[round(RESULTS$StateEnd,3)==(-999.999)] <- NA;
 
-    } else {
-    ##R_version
-      L  <- length(IndPeriod1)
-      P0 <- InputsModel$Precip[ IndPeriod1][1:(L-1)]
-      P1 <- InputsModel$Precip[ IndPeriod1][2: L   ]
-      E1 <- InputsModel$PotEvap[IndPeriod1][2: L   ]
-      Q1 <- P1*(1.-1./(1.+((0.7*P1+0.3*P0)/Param[1]/E1)^2.0)^0.5)
-      PEQ <- rbind(c(NA,NA,NA),cbind(E1,P1,Q1))
-      Outputs <- PEQ[,IndOutputs]
-      if(is.vector(Outputs)){ Outputs <- cbind(Outputs); }
-      RESULTS <- list(NOutputs=length(IndOutputs),IndOutputs=IndOutputs,Outputs=Outputs,StatesEnd=NA)
-   }
         
     
     ##Output_data_preparation
-- 
GitLab