Hi community,
I am trying to make a triangular hyetograph using the prosou.f subroutine. I see there is different post about this topic and i read many of them but i want to use a different algorythm.
I just have a problem with the test in my code :
IF (AT.LT.TEMPS_MAX)THEN.
In fact this condition is never true when it should be true from AT=0 to AT= evenement duration/2.
The TEMPS_MAX is the evenement duration/2.
And I calculate it : time step (DT) * Number of step (LT)/2
Note that if I replace TEMPS_EVENEMENT by 1800.D0, then my test works. So it seems that the problem is coming from the calcul of TEMPS_EVENEMENT.
The code is as following.
IF(RAIN) THEN
PLUIE_MAX = RAIN_MMPD*2.D0
TEMPS_EVENEMENT = LT*DT
TEMPS_MAX = TEMPS_EVENEMENT/2.D0
IF (AT.LT.TEMPS_MAX)THEN
RAIN_MPS=RAIN_MMPD/86400000.D0*10.D0
! RAIN_MPS=AT/TEMPS_MAX*PLUIE_MAX
ELSE
RAIN_MPS=RAIN_MMPD/86400000.D0
! RAIN_MPS=AT/(TEMPS_EVENEMENT-TEMPS_MAX)*PLUIE_MAX
ENDIF
! RAIN_MPS=RAIN_MMPD/86400000.D0*10
SURDT=1.D0/DT
IF(BANDEC) THEN
! EVAPORATION (TENTATIVELY...) LIMITED BY AVAILABLE WATER
DO I=1,NPOIN
PLUIE%R(I)=MAX(RAIN_MPS,-HN%R(I)*SURDT)
ENDDO
ELSE
CALL OS('X=C ',X=PLUIE,C=RAIN_MPS)
ENDIF
ENDIF
Is there a way to check the value of the different variables : PLUIE_MAX, TEMPS_EVENEMENT, TEMPS_MAX, PLUIE.
Nota : The variables are declared above in the program ;
The comment in the test are the real expression i will use when the test will work.
Thanks for your help.