Commit cd4ff63a authored by unknown's avatar unknown
Browse files

v1.0.5.12 convert type from REAL(4) to REAL(8) when the MAX() function is used...

v1.0.5.12 convert type from REAL(4) to REAL(8) when the MAX() function is used with REAL(8) variables in FORTRAN codes in order to succeed the check of the CRAN
Showing with 33 additions and 33 deletions
+33 -33
Package: airGR Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.5.11 Version: 1.0.5.12
Date: 2017-01-23 Date: 2017-01-23
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl")), person("Laurent", "Coron", role = c("aut", "trl")),
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
RELEASE HISTORY OF THE airGR PACKAGE RELEASE HISTORY OF THE airGR PACKAGE
#### 1.0.5.10 RELEASE NOTES ########################### #### 1.0.5.12 RELEASE NOTES ###########################
- Bug fixed in DataAltiExtrapolation_Valery(). The elevation gradients for air temperature returned by CreateInputsModel() are improved. - Bug fixed in DataAltiExtrapolation_Valery(). The elevation gradients for air temperature returned by CreateInputsModel() are improved.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
\alias{airGR} \alias{airGR}
\docType{package} \docType{package}
\encoding{UTF-8} \encoding{UTF-8}
\title{Suite of GR hydrological models for precipitation-runoff modelling} \title{Suite of GR Hydrological Models for Precipitation-Runoff Modelling}
\description{ \description{
This package brings into R the hydrological modelling tools used at Irstea-Antony (HBAN Research Unit, France), including rainfall-runoff models (GR4H, GR4J, GR5J, GR6J, GR2M, GR1A) and a snowmelt module (CemaNeige). Each model core is coded in FORTRAN to ensure low computational time. The other package functions (i.e. mainly the calibration algorithm and the computation of the efficiency criteria) are coded in R. \cr This package brings into R the hydrological modelling tools used at Irstea-Antony (HBAN Research Unit, France), including rainfall-runoff models (GR4H, GR4J, GR5J, GR6J, GR2M, GR1A) and a snowmelt module (CemaNeige). Each model core is coded in FORTRAN to ensure low computational time. The other package functions (i.e. mainly the calibration algorithm and the computation of the efficiency criteria) are coded in R. \cr
......
...@@ -46,14 +46,14 @@ ...@@ -46,14 +46,14 @@
!-------------------------------------------------------------- !--------------------------------------------------------------
!initilisation des constantes !initilisation des constantes
Tmelt=0 Tmelt=0.
Gthreshold=0.9*MeanAnSolidPrecip Gthreshold=0.9*MeanAnSolidPrecip
MinSpeed=0.1 MinSpeed=0.1
!initilisation of model states using StateStart !initilisation of model states using StateStart
G=StateStart(1) G=StateStart(1)
eTG=StateStart(2) eTG=StateStart(2)
PliqAndMelt=0 PliqAndMelt=0.
!setting parameter values !setting parameter values
CTG=Param(1) CTG=Param(1)
...@@ -79,21 +79,21 @@ c Outputs = -999.999 !initialisation made in R ...@@ -79,21 +79,21 @@ c Outputs = -999.999 !initialisation made in R
!Snow pack thermal state before melt !Snow pack thermal state before melt
eTG=CTG*eTG + (1-CTG)*InputsTemp(k) eTG=CTG*eTG + (1-CTG)*InputsTemp(k)
IF(eTG.GT.0) eTG=0 IF(eTG.GT.0.) eTG=0.
!Potential melt !Potential melt
IF(eTG.EQ.0.AND.InputsTemp(k).GT.Tmelt) THEN IF(eTG.EQ.0..AND.InputsTemp(k).GT.Tmelt) THEN
PotMelt=Kf*(InputsTemp(k)-Tmelt) PotMelt=Kf*(InputsTemp(k)-Tmelt)
IF(PotMelt.GT.G) PotMelt=G IF(PotMelt.GT.G) PotMelt=G
ELSE ELSE
PotMelt=0 PotMelt=0.
ENDIF ENDIF
!Gratio !Gratio
IF(G.LT.Gthreshold) THEN IF(G.LT.Gthreshold) THEN
Gratio=G/Gthreshold Gratio=G/Gthreshold
ELSE ELSE
Gratio=1 Gratio=1.
ENDIF ENDIF
!Actual melt !Actual melt
...@@ -106,7 +106,7 @@ c Outputs = -999.999 !initialisation made in R ...@@ -106,7 +106,7 @@ c Outputs = -999.999 !initialisation made in R
IF(G.LT.Gthreshold) THEN IF(G.LT.Gthreshold) THEN
Gratio=G/Gthreshold Gratio=G/Gthreshold
ELSE ELSE
Gratio=1 Gratio=1.
ENDIF ENDIF
!Water volume to pass to the hydrological model !Water volume to pass to the hydrological model
......
...@@ -121,7 +121,7 @@ C********************************************************************** ...@@ -121,7 +121,7 @@ C**********************************************************************
C Production store C Production store
WS=P/Param(1) WS=P/Param(1)
IF(WS.GT.13)WS=13 IF(WS.GT.13.)WS=13.
! speed-up ! speed-up
TWS = tanHyp(WS) TWS = tanHyp(WS)
...@@ -131,7 +131,7 @@ C Production store ...@@ -131,7 +131,7 @@ C Production store
P1=P+St(1)-S1 P1=P+St(1)-S1
WS=E/Param(1) WS=E/Param(1)
IF(WS.GT.13)WS=13 IF(WS.GT.13.)WS=13.
! speed-up ! speed-up
TWS = tanHyp(WS) TWS = tanHyp(WS)
......
...@@ -165,7 +165,7 @@ C Interception and production store ...@@ -165,7 +165,7 @@ C Interception and production store
EN=E-P1 EN=E-P1
PN=0. PN=0.
WS=EN/A WS=EN/A
IF(WS.GT.13)WS=13. IF(WS.GT.13.)WS=13.
! speed-up ! speed-up
TWS = tanHyp(WS) TWS = tanHyp(WS)
...@@ -182,7 +182,7 @@ C Interception and production store ...@@ -182,7 +182,7 @@ C Interception and production store
AE=E AE=E
PN=P1-E PN=P1-E
WS=PN/A WS=PN/A
IF(WS.GT.13)WS=13. IF(WS.GT.13.)WS=13.
! speed-up ! speed-up
TWS = tanHyp(WS) TWS = tanHyp(WS)
...@@ -236,7 +236,7 @@ C Potential intercatchment semi-exchange ...@@ -236,7 +236,7 @@ C Potential intercatchment semi-exchange
C Routing store C Routing store
AEXCH1=EXCH AEXCH1=EXCH
IF((St(2)+StUH1(1)+EXCH).LT.0) AEXCH1=-St(2)-StUH1(1) IF((St(2)+StUH1(1)+EXCH).LT.0.) AEXCH1=-St(2)-StUH1(1)
St(2)=St(2)+StUH1(1)+EXCH St(2)=St(2)+StUH1(1)+EXCH
IF(St(2).LT.0.)St(1)=0. IF(St(2).LT.0.)St(1)=0.
...@@ -252,8 +252,8 @@ C Routing store ...@@ -252,8 +252,8 @@ C Routing store
C Runoff from direct branch QD C Runoff from direct branch QD
AEXCH2=EXCH AEXCH2=EXCH
IF((StUH2(1)+EXCH).LT.0) AEXCH2=-StUH2(1) IF((StUH2(1)+EXCH).LT.0.) AEXCH2=-StUH2(1)
QD=MAX(0.,StUH2(1)+EXCH) QD=MAX(0.d0,StUH2(1)+EXCH)
C Total runoff C Total runoff
Q=QR+QD Q=QR+QD
......
...@@ -164,7 +164,7 @@ C Interception and production store ...@@ -164,7 +164,7 @@ C Interception and production store
EN=E-P1 EN=E-P1
PN=0. PN=0.
WS=EN/A WS=EN/A
IF(WS.GT.13)WS=13. IF(WS.GT.13.)WS=13.
! speed-up ! speed-up
TWS = tanHyp(WS) TWS = tanHyp(WS)
Sr = St(1)/A Sr = St(1)/A
...@@ -179,7 +179,7 @@ C Interception and production store ...@@ -179,7 +179,7 @@ C Interception and production store
AE=E AE=E
PN=P1-E PN=P1-E
WS=PN/A WS=PN/A
IF(WS.GT.13)WS=13. IF(WS.GT.13.)WS=13.
! speed-up ! speed-up
TWS = tanHyp(WS) TWS = tanHyp(WS)
Sr = St(1)/A Sr = St(1)/A
...@@ -229,7 +229,7 @@ C Potential intercatchment semi-exchange ...@@ -229,7 +229,7 @@ C Potential intercatchment semi-exchange
C Routing store C Routing store
AEXCH1=EXCH AEXCH1=EXCH
IF((St(2)+StUH1(1)+EXCH).LT.0) AEXCH1=-St(2)-StUH1(1) IF((St(2)+StUH1(1)+EXCH).LT.0.) AEXCH1=-St(2)-StUH1(1)
St(2)=St(2)+StUH1(1)+EXCH St(2)=St(2)+StUH1(1)+EXCH
IF(St(2).LT.0.)St(2)=0. IF(St(2).LT.0.)St(2)=0.
! speed-up ! speed-up
...@@ -243,8 +243,8 @@ C Routing store ...@@ -243,8 +243,8 @@ C Routing store
C Runoff from direct branch QD C Runoff from direct branch QD
AEXCH2=EXCH AEXCH2=EXCH
IF((StUH2(1)+EXCH).LT.0) AEXCH2=-StUH2(1) IF((StUH2(1)+EXCH).LT.0.) AEXCH2=-StUH2(1)
QD=MAX(0.,StUH2(1)+EXCH) QD=MAX(0.d0,StUH2(1)+EXCH)
C Total runoff C Total runoff
Q=QR+QD Q=QR+QD
......
...@@ -154,7 +154,7 @@ C Interception and production store ...@@ -154,7 +154,7 @@ C Interception and production store
EN=E-P1 EN=E-P1
PN=0. PN=0.
WS=EN/A WS=EN/A
IF(WS.GT.13)WS=13. IF(WS.GT.13.)WS=13.
! speed-up ! speed-up
TWS = tanHyp(WS) TWS = tanHyp(WS)
Sr = St(1)/A Sr = St(1)/A
...@@ -169,7 +169,7 @@ C Interception and production store ...@@ -169,7 +169,7 @@ C Interception and production store
AE=E AE=E
PN=P1-E PN=P1-E
WS=PN/A WS=PN/A
IF(WS.GT.13)WS=13. IF(WS.GT.13.)WS=13.
! speed-up ! speed-up
TWS = tanHyp(WS) TWS = tanHyp(WS)
Sr = St(1)/A Sr = St(1)/A
...@@ -212,7 +212,7 @@ C Potential intercatchment semi-exchange ...@@ -212,7 +212,7 @@ C Potential intercatchment semi-exchange
C Routing store C Routing store
AEXCH1=EXCH AEXCH1=EXCH
IF((St(2)+Q9+EXCH).LT.0) AEXCH1=-St(2)-Q9 IF((St(2)+Q9+EXCH).LT.0.) AEXCH1=-St(2)-Q9
St(2)=St(2)+Q9+EXCH St(2)=St(2)+Q9+EXCH
IF(St(2).LT.0.)St(2)=0. IF(St(2).LT.0.)St(2)=0.
...@@ -228,8 +228,8 @@ C Routing store ...@@ -228,8 +228,8 @@ C Routing store
C Runoff from direct branch QD C Runoff from direct branch QD
AEXCH2=EXCH AEXCH2=EXCH
IF((Q1+EXCH).LT.0) AEXCH2=-Q1 IF((Q1+EXCH).LT.0.) AEXCH2=-Q1
QD=MAX(0.,Q1+EXCH) QD=MAX(0.d0,Q1+EXCH)
C Total runoff C Total runoff
Q=QR+QD Q=QR+QD
......
...@@ -148,7 +148,7 @@ C********************************************************************** ...@@ -148,7 +148,7 @@ C**********************************************************************
PARAMETER (NH=20,NMISC=30) PARAMETER (NH=20,NMISC=30)
PARAMETER (NParam=6) PARAMETER (NParam=6)
DOUBLEPRECISION St(3) DOUBLEPRECISION St(3)
DOUBLEPRECISION StUH1(NH),StUH2(2*NH),OrdUH1(NH),OrdUH2(2*NH) DOUBLEPRECISION StUH1(NH),StUH2(2*NH),OrdUH1(NH),OrdUH2(2*NH)
DOUBLEPRECISION Param(NParam) DOUBLEPRECISION Param(NParam)
DOUBLEPRECISION MISC(NMISC) DOUBLEPRECISION MISC(NMISC)
DOUBLEPRECISION P1,E,Q DOUBLEPRECISION P1,E,Q
...@@ -273,7 +273,7 @@ C Update of exponential store ...@@ -273,7 +273,7 @@ C Update of exponential store
C Runoff from direct branch QD C Runoff from direct branch QD
AEXCH2=EXCH AEXCH2=EXCH
IF((StUH2(1)+EXCH).LT.0) AEXCH2=-StUH2(1) IF((StUH2(1)+EXCH).LT.0) AEXCH2=-StUH2(1)
QD=MAX(0.,StUH2(1)+EXCH) QD=MAX(0.d0,StUH2(1)+EXCH)
C Total runoff C Total runoff
Q=QR+QD+QR1 Q=QR+QD+QR1
......
...@@ -57,7 +57,7 @@ C********************************************************************** ...@@ -57,7 +57,7 @@ C**********************************************************************
INTEGER I,FI INTEGER I,FI
FI=I FI=I
IF(FI.LE.0.) THEN IF(FI.LE.0) THEN
SS1=0. SS1=0.
RETURN RETURN
ENDIF ENDIF
...@@ -84,7 +84,7 @@ C********************************************************************** ...@@ -84,7 +84,7 @@ C**********************************************************************
INTEGER I,FI INTEGER I,FI
FI=I FI=I
IF(FI.LE.0.) THEN IF(FI.LE.0) THEN
SS2=0. SS2=0.
RETURN RETURN
ENDIF ENDIF
......
...@@ -59,7 +59,7 @@ C********************************************************************** ...@@ -59,7 +59,7 @@ C**********************************************************************
INTEGER I,FI INTEGER I,FI
FI=I FI=I
IF(FI.LE.0.) THEN IF(FI.LE.0) THEN
SS1_H=0. SS1_H=0.
RETURN RETURN
ENDIF ENDIF
...@@ -86,7 +86,7 @@ C********************************************************************** ...@@ -86,7 +86,7 @@ C**********************************************************************
INTEGER I,FI INTEGER I,FI
FI=I FI=I
IF(FI.LE.0.) THEN IF(FI.LE.0) THEN
SS2_H=0. SS2_H=0.
RETURN RETURN
ENDIF ENDIF
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment