From 896a03b7ef13c77161ecfe43f03c649be78590c8 Mon Sep 17 00:00:00 2001
From: Delaigue Olivier <olivier.delaigue@irstea.priv>
Date: Wed, 3 Apr 2019 15:53:10 +0200
Subject: [PATCH] v1.2.13.15 CLEAN: unused variables removed from Fortran files

---
 DESCRIPTION          | 2 +-
 NEWS.rmd             | 5 ++---
 src/frun_CEMANEIGE.f | 2 +-
 src/frun_GR1A.f      | 2 ++
 src/frun_GR2M.f      | 2 +-
 src/frun_GR5J.f      | 2 +-
 6 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index fabdb875..15b4faf3 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.2.13.14
+Version: 1.2.13.15
 Date: 2019-04-03
 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 74919746..e7e4acff 100644
--- a/NEWS.rmd
+++ b/NEWS.rmd
@@ -13,7 +13,7 @@ output:
 
 
 
-### 1.2.13.14 Release Notes (2019-04-03)
+### 1.2.13.15 Release Notes (2019-04-03)
 
 
 #### Deprecated and defunct
@@ -27,7 +27,6 @@ output:
 - The <code>plot_OutputsModel()</code> had been deprecated in airGR 1.0.4 (it had been replaced by the use of <code>plot.OutputsModel()</code> or <code>plot()</code>) and is defunct now. 
 
 
-
 #### New features
 
 - <code>CreateInputsCrit()</code> now presents a <code>VarObs</code> argument in order to allow to prepare an <code>InputsCrit</code> object in order to run a criterion on other variables than observed discharges with the <code>ErrorCrit()</code> function (at the moment SCA and SWE).
@@ -98,7 +97,7 @@ output:
 
 #### CRAN-compatibility updates
 
-- Tabulation removed and variable statements fixed in Fortran files
+- Tabulation removed, unused variables removed and variable statements fixed in Fortran files.
 
 ____________________________________________________________________________________
 
diff --git a/src/frun_CEMANEIGE.f b/src/frun_CEMANEIGE.f
index 23f7d26d..f58328e0 100644
--- a/src/frun_CEMANEIGE.f
+++ b/src/frun_CEMANEIGE.f
@@ -93,7 +93,7 @@ c      Outputs = -999.999  !initialisation made in R
         Psol=InputsFracSolidPrecip(k)*InputsPrecip(k)
 
         !Snow pack volume before melt
-        IF (IsHyst) Ginit=G
+        Ginit=G
         G=G+Psol
         
 
diff --git a/src/frun_GR1A.f b/src/frun_GR1A.f
index dc4d31a8..4c0ece58 100644
--- a/src/frun_GR1A.f
+++ b/src/frun_GR1A.f
@@ -49,6 +49,8 @@
       MISC = -999.999
 c      Outputs = -999.999  !initialization made in R
 
+      StateStart = -999.999  ! CRAN-compatibility updates
+      StateEnd = -999.999  ! CRAN-compatibility updates
 
 
       !--------------------------------------------------------------
diff --git a/src/frun_GR2M.f b/src/frun_GR2M.f
index a53b2c57..942fe573 100644
--- a/src/frun_GR2M.f
+++ b/src/frun_GR2M.f
@@ -117,7 +117,7 @@ C**********************************************************************
       DOUBLEPRECISION WS,tanHyp,S1,S2
       DOUBLEPRECISION P1,P2,P3,R1,R2,AE,EXCH
 
-      DOUBLEPRECISION TWS, Sr, Rr ! speed-up
+      DOUBLEPRECISION TWS, Sr ! speed-up
 
 C Production store
       WS=P/Param(1)  
diff --git a/src/frun_GR5J.f b/src/frun_GR5J.f
index 74546f31..c6df7455 100644
--- a/src/frun_GR5J.f
+++ b/src/frun_GR5J.f
@@ -139,7 +139,7 @@ C**********************************************************************
       DOUBLEPRECISION MISC(NMISC)
       DOUBLEPRECISION P1,E,Q
       DOUBLEPRECISION A,B,EN,ER,PN,PR,PS,WS,tanHyp
-      DOUBLEPRECISION PERC,PRHU1,PRHU2,EXCH,QR,QD,Q1,Q9
+      DOUBLEPRECISION PERC,EXCH,QR,QD,Q1,Q9
       DOUBLEPRECISION AE,AEXCH1,AEXCH2
       INTEGER K
 
-- 
GitLab