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
parent 679c4822
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.0.5.11
Version: 1.0.5.12
Date: 2017-01-23
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl")),
......
......@@ -2,7 +2,7 @@
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.
......
......@@ -2,7 +2,7 @@
\alias{airGR}
\docType{package}
\encoding{UTF-8}
\title{Suite of GR hydrological models for precipitation-runoff modelling}
\title{Suite of GR Hydrological Models for Precipitation-Runoff Modelling}
\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
......
......@@ -46,14 +46,14 @@
!--------------------------------------------------------------
!initilisation des constantes
Tmelt=0
Tmelt=0.
Gthreshold=0.9*MeanAnSolidPrecip
MinSpeed=0.1
!initilisation of model states using StateStart
G=StateStart(1)
eTG=StateStart(2)
PliqAndMelt=0
PliqAndMelt=0.
!setting parameter values
CTG=Param(1)
......@@ -79,21 +79,21 @@ c Outputs = -999.999 !initialisation made in R
!Snow pack thermal state before melt
eTG=CTG*eTG + (1-CTG)*InputsTemp(k)
IF(eTG.GT.0) eTG=0
IF(eTG.GT.0.) eTG=0.
!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)
IF(PotMelt.GT.G) PotMelt=G
ELSE
PotMelt=0
PotMelt=0.
ENDIF
!Gratio
IF(G.LT.Gthreshold) THEN
Gratio=G/Gthreshold
ELSE
Gratio=1
Gratio=1.
ENDIF
!Actual melt
......@@ -106,7 +106,7 @@ c Outputs = -999.999 !initialisation made in R
IF(G.LT.Gthreshold) THEN
Gratio=G/Gthreshold
ELSE
Gratio=1
Gratio=1.
ENDIF
!Water volume to pass to the hydrological model
......
......@@ -121,7 +121,7 @@ C**********************************************************************
C Production store
WS=P/Param(1)
IF(WS.GT.13)WS=13
IF(WS.GT.13.)WS=13.
! speed-up
TWS = tanHyp(WS)
......@@ -131,7 +131,7 @@ C Production store
P1=P+St(1)-S1
WS=E/Param(1)
IF(WS.GT.13)WS=13
IF(WS.GT.13.)WS=13.
! speed-up
TWS = tanHyp(WS)
......
......@@ -165,7 +165,7 @@ C Interception and production store
EN=E-P1
PN=0.
WS=EN/A
IF(WS.GT.13)WS=13.
IF(WS.GT.13.)WS=13.
! speed-up
TWS = tanHyp(WS)
......@@ -182,7 +182,7 @@ C Interception and production store
AE=E
PN=P1-E
WS=PN/A
IF(WS.GT.13)WS=13.
IF(WS.GT.13.)WS=13.
! speed-up
TWS = tanHyp(WS)
......@@ -236,7 +236,7 @@ C Potential intercatchment semi-exchange
C Routing store
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
IF(St(2).LT.0.)St(1)=0.
......@@ -252,8 +252,8 @@ C Routing store
C Runoff from direct branch QD
AEXCH2=EXCH
IF((StUH2(1)+EXCH).LT.0) AEXCH2=-StUH2(1)
QD=MAX(0.,StUH2(1)+EXCH)
IF((StUH2(1)+EXCH).LT.0.) AEXCH2=-StUH2(1)
QD=MAX(0.d0,StUH2(1)+EXCH)
C Total runoff
Q=QR+QD
......
......@@ -164,7 +164,7 @@ C Interception and production store
EN=E-P1
PN=0.
WS=EN/A
IF(WS.GT.13)WS=13.
IF(WS.GT.13.)WS=13.
! speed-up
TWS = tanHyp(WS)
Sr = St(1)/A
......@@ -179,7 +179,7 @@ C Interception and production store
AE=E
PN=P1-E
WS=PN/A
IF(WS.GT.13)WS=13.
IF(WS.GT.13.)WS=13.
! speed-up
TWS = tanHyp(WS)
Sr = St(1)/A
......@@ -229,7 +229,7 @@ C Potential intercatchment semi-exchange
C Routing store
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
IF(St(2).LT.0.)St(2)=0.
! speed-up
......@@ -243,8 +243,8 @@ C Routing store
C Runoff from direct branch QD
AEXCH2=EXCH
IF((StUH2(1)+EXCH).LT.0) AEXCH2=-StUH2(1)
QD=MAX(0.,StUH2(1)+EXCH)
IF((StUH2(1)+EXCH).LT.0.) AEXCH2=-StUH2(1)
QD=MAX(0.d0,StUH2(1)+EXCH)
C Total runoff
Q=QR+QD
......
......@@ -154,7 +154,7 @@ C Interception and production store
EN=E-P1
PN=0.
WS=EN/A
IF(WS.GT.13)WS=13.
IF(WS.GT.13.)WS=13.
! speed-up
TWS = tanHyp(WS)
Sr = St(1)/A
......@@ -169,7 +169,7 @@ C Interception and production store
AE=E
PN=P1-E
WS=PN/A
IF(WS.GT.13)WS=13.
IF(WS.GT.13.)WS=13.
! speed-up
TWS = tanHyp(WS)
Sr = St(1)/A
......@@ -212,7 +212,7 @@ C Potential intercatchment semi-exchange
C Routing store
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
IF(St(2).LT.0.)St(2)=0.
......@@ -228,8 +228,8 @@ C Routing store
C Runoff from direct branch QD
AEXCH2=EXCH
IF((Q1+EXCH).LT.0) AEXCH2=-Q1
QD=MAX(0.,Q1+EXCH)
IF((Q1+EXCH).LT.0.) AEXCH2=-Q1
QD=MAX(0.d0,Q1+EXCH)
C Total runoff
Q=QR+QD
......
......@@ -148,7 +148,7 @@ C**********************************************************************
PARAMETER (NH=20,NMISC=30)
PARAMETER (NParam=6)
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 MISC(NMISC)
DOUBLEPRECISION P1,E,Q
......@@ -273,7 +273,7 @@ C Update of exponential store
C Runoff from direct branch QD
AEXCH2=EXCH
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
Q=QR+QD+QR1
......
......@@ -57,7 +57,7 @@ C**********************************************************************
INTEGER I,FI
FI=I
IF(FI.LE.0.) THEN
IF(FI.LE.0) THEN
SS1=0.
RETURN
ENDIF
......@@ -84,7 +84,7 @@ C**********************************************************************
INTEGER I,FI
FI=I
IF(FI.LE.0.) THEN
IF(FI.LE.0) THEN
SS2=0.
RETURN
ENDIF
......
......@@ -59,7 +59,7 @@ C**********************************************************************
INTEGER I,FI
FI=I
IF(FI.LE.0.) THEN
IF(FI.LE.0) THEN
SS1_H=0.
RETURN
ENDIF
......@@ -86,7 +86,7 @@ C**********************************************************************
INTEGER I,FI
FI=I
IF(FI.LE.0.) THEN
IF(FI.LE.0) THEN
SS2_H=0.
RETURN
ENDIF
......
Markdown is supported
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