From af730fcc0bcdc73bb60a634d9c8fa6a0c3e624b2 Mon Sep 17 00:00:00 2001
From: Hban Mesure <>
Date: Thu, 5 Dec 2019 13:10:22 +0100
Subject: [PATCH] v1.4.1.7 BUG: variable ER has been renamed ES in
 frun_FR5H.f90 #13 it was only the case for the outputs (the other items were
 forgotten)

---
 DESCRIPTION       |  2 +-
 NEWS.md           |  2 +-
 src/frun_GR5H.f90 | 16 ++++++++--------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 7dc790aa..657e553b 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.4.1.6
+Version: 1.4.1.7
 Date: 2019-12-05
 Authors@R: c(
   person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
diff --git a/NEWS.md b/NEWS.md
index 5d423a9e..18a5f09e 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,7 +2,7 @@
 
 
 
-### 1.4.1.6 Release Notes (2019-12-05)
+### 1.4.1.7 Release Notes (2019-12-05)
 
 
 #### New features
diff --git a/src/frun_GR5H.f90 b/src/frun_GR5H.f90
index 47dbd990..b2153204 100644
--- a/src/frun_GR5H.f90
+++ b/src/frun_GR5H.f90
@@ -182,7 +182,7 @@
 
       !! locals
       integer, parameter :: NParam=5,NMISC=30,NH=480
-      doubleprecision :: A,EN,ER,PN,PR,PS,WS,tanHyp,EI
+      doubleprecision :: A,EN,ES,PN,PR,PS,WS,tanHyp,EI
       doubleprecision :: PERC,EXCH,QR,QD,Q1,Q9
       doubleprecision :: AE,AEXCH1,AEXCH2
       integer :: K
@@ -226,9 +226,9 @@
           expWS=exp(2.*WS)
           TWS = (expWS - 1.)/(expWS + 1.)
           Sr = St(1)/A
-          ER=St(1)*(2.-Sr)*TWS/(1.+(1.-Sr)*TWS)
-          St(1)=St(1)-ER
-          AE=ER+EI
+          ES=St(1)*(2.-Sr)*TWS/(1.+(1.-Sr)*TWS)
+          St(1)=St(1)-ES
+          AE=ES+EI
         ELSE
           AE=EI
         ENDIF
@@ -259,12 +259,12 @@
           expWS=exp(2.*WS)
           TWS = (expWS - 1.)/(expWS + 1.)
           Sr = St(1)/A
-          ER=St(1)*(2.-Sr)*TWS/(1.+(1.-Sr)*TWS)
-          ! ER=X(2)*(2.-X(2)/A)*tanHyp(WS)/(1.+(1.-X(2)/A)*tanHyp(WS))
+          ES=St(1)*(2.-Sr)*TWS/(1.+(1.-Sr)*TWS)
+          ! ES=X(2)*(2.-X(2)/A)*tanHyp(WS)/(1.+(1.-X(2)/A)*tanHyp(WS))
           ! end speed-up  
-          AE=ER+P1
+          AE=ES+P1
           EI = P1
-          St(1)=St(1)-ER
+          St(1)=St(1)-ES
           PS=0.
           PR=0.
         ELSE
-- 
GitLab