Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: RAIN OR EVAPORATION: test with values variable in time

RAIN OR EVAPORATION: test with values variable in time 11 years 4 months ago #9569

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hi all!

I made a test using the new function RAIN by setting a triangular hyetograph expressed as a function of RAIN_MPS in prosou.f. Here is the code.
!     RAIN-EVAPORATION
!
      IF(RAIN) THEN
        RAIN_MPS=RAIN_MMPD/86400000.D0
        SURDT=1.D0/DT
        IF(BANDEC) THEN
!         EVAPORATION (TENTATIVELY...) LIMITED BY AVAILABLE WATER
          DO I=1,NPOIN
!***Triangular hyetograph*********
!*****LOOP ON TIME: START*********
            IF(AT.EQ.0.D0) THEN
                PLUIE%R(I)=RAIN_MPS*0.D0
              ELSEIF(AT.GT.0.D0.AND.AT.LE.3600.D0) THEN  
                PLUIE%R(I)=MAX(RAIN_MPS*AT/3600.D0,-HN%R(I)*SURDT)
              ELSEIF(AT.GT.3600.D0.AND.AT.LE.7200.D0) THEN
                PLUIE%R(I)=MAX(2.D0*RAIN_MPS-RAIN_MPS*AT/3600.D0,-HN%R(I)*SURDT)
              ELSE
                PLUIE%R(I)=RAIN_MPS*0.D0
! Original bkp                PLUIE%R(I)=MAX(RAIN_MPS,-HN%R(I)*SURDT)
            ENDIF
!*****LOOP ON TIME: END***********
          ENDDO
        ELSE
          CALL OS('X=C     ',X=PLUIE,C=RAIN_MPS)
        ENDIF 
      ENDIF

It works well excepted for t = 0 where the value of PLUIE is infinity instead of 0 (I added the variable PLUIE%R(N) in my result file via PRERES_TELEMAC2D).
Is it due to my coding of the hyetograph? What can cause this problem? What is the role of HN%R(I)*SURDT?

I also noticed that the volume balance was pretty poor with a type of advection of 1;5 and Option for treatment of tidal flats = 1. With 14;5 and the 2nd option (flux) for treatment of tidal flats, results are much better.

Lastly, would it be possible in a future release to be able to define rain or evaporation rates as a function of time in a dedicated data file for example?

Thanks a lot in advance
Regards PL
The administrator has disabled public write access.

RAIN OR EVAPORATION: test with values variable in time 11 years 4 months ago #9582

  • riadh
  • riadh's Avatar
Hello

You need to keep the test "if bandec" because it is a test for tidal flats.

the test with time should replace the computation of RAIN_MPS (rain in meter per second). Thus your program should look like

IF(RAIN) THEN
RAIN_MPS=RAIN_MMPD/86400000.D0 ! (rain in mm per day / nb of second per day)
SURDT=1.D0/DT
if (AT .LT.3600.d0)then
rain_mps = rain_mps*at/3600 ! or whatever you want
elseil (condition )then
rain_mps = ....
else
rain_mps = ....
endif

!and then

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

I hope that this helps


Kind regards

Riadh
The administrator has disabled public write access.

RAIN OR EVAPORATION: test with values variable in time 11 years 4 months ago #9593

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I am not sure that a test like IF(AT.EQ.0.D0) THEN... really works. Try instead IF(ABS(AT).LT.1.D-6) THEN...

or just :

PLUIE%R(I)=0.D0
IF(AT.GT.0.D0.AND.AT.LE.3600.D0) THEN
PLUIE%R(I)=MAX(RAIN_MPS*AT/3600.D0,-HN%R(I)*SURDT)
ELSEIF(AT.GT.3600.D0.AND.AT.LE.7200.D0) THEN
PLUIE%R(I)=MAX(2.D0*RAIN_MPS-RAIN_MPS*AT/3600.D0,-HN%R(I)*SURDT)
ENDIF

The -HN%R(I)*SURDT is to avoid evaporating more than the available water.

Regards,

JMH
The administrator has disabled public write access.

RAIN OR EVAPORATION: test with values variable in time 11 years 4 months ago #9671

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hello,

Thanks Riadh and JMH for your suggestions.
Isn't the most efficient (regarding CPU time) way to compute the hyetograh to exclude it from the DO loop, as Riadh suggests?

I made the modification for AT = 0 as JMH suggests. However, when I check the value of PLUIE in my result file, I still have infinity for t = 0s.
I process the PLUIE variable in PRERES_TELEMAC2D as follows:
! COMPUTES BACK RAIN IN MM/DAY
!=======================================================================
!
      IF((LEO.AND.SORLEO(23)).OR.(IMP.AND.SORIMP(23))) THEN
        DO N=1,NPOIN
          PRIVE%ADR(1)%P%R(N)=PLUIE%R(N)*86400000.D0
        ENDDO
      ENDIF
!

The purpose is just to check the values of RAIN_MMPD.
What can cause this value at t = 0s? Can it be a reading problem by fudaa?

Furthermore, I am considering about using RAIN with different values in each sub-basin. I thought of proceeding as follows:
- defining and adding a variable 'procent of RAIN_MMPD' in the geometry file. This variable is thus ranging from 0 to 1.
- reading and using the new variable in PROSOU in order to customize each hyetograph.

I have seen an example on how to read and use a user variable from the geometry file in a Sisyphe subroutine (a customized noerod.f), but I have not succeeded to reproduce the same procedure on other T2D subroutines (dragfo.f). I guess the problem came from which USE DECLARATION to be used but couldn't fix it.
Any advice on this would be much appreciated!

Thanks in advance
Regards

PL
The administrator has disabled public write access.

RAIN OR EVAPORATION: test with values variable in time 11 years 4 months ago #9675

  • jmhervouet
  • jmhervouet's Avatar
Hello,

You are right, the first call to preres_telemac2d for the initial conditions is at line 984 in telemac2d and PLUIE is built in prosou.f called at line 1772, so PLUIE is not defined when you put it into PRIVE for the first time. In your version of preres_telemac2d you can add a case IF(LT.EQ.0) THEN... you put 0.D0 into PRIVE, anyway this value will not be used, this is only for a clean output.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

RAIN OR EVAPORATION: test with values variable in time 10 years 9 months ago #11773

  • Flo64
  • Flo64's Avatar
Hi,

This post was created for telemac2d.
I work with telemac3d v6p2 and in my steering file, i put "RAINS OR EVAPORATION = YES" but i have a temporal variation of the precipitation.
Must i change BORD3D?

Thanks
Florian
The administrator has disabled public write access.

RAIN OR EVAPORATION: test with values variable in time 10 years 9 months ago #11775

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Yes it is probably possible to do so. I am just not so sure that the mass balance checking will be correct, because so far the value of rain at times n and n+1 is the same and was not distinguished in the implementation. Just tell me what happens.

Regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

RAIN OR EVAPORATION: test with values variable in time 8 years 2 months ago #23823

  • chelobarros
  • chelobarros's Avatar
hi everybody.

is there a simple example of how to do the hyetograph input of rain in to telemac2d?

i looked in the example documentation but could not find anything. i would appreciate if someone points me to the right directions in this this matter.

grettings,
chelo.
The administrator has disabled public write access.

RAIN OR EVAPORATION: test with values variable in time 8 years 2 months ago #23825

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hi,

This has also been recently discussed in the following topic (example of hyetograph will be included in the new runoff model coming up with next version 7.2):
www.opentelemac.org/index.php/kunena/16-...h-subroutine-meteo-f

Nevertheless, I attach an old prosou.f file I used to define my own 24-hr hyetograph in an earlier model (not sure if the prosou.f version is compatible with version 7.1 but you can inspire yourself from it).

Best regards
PL

File Attachment:

File Name: fortran.f
File Size: 55 KB
The administrator has disabled public write access.

RAIN OR EVAPORATION: test with values variable in time 8 years 2 months ago #23832

  • chelobarros
  • chelobarros's Avatar
hi, thank you for replying.

i found this in the meteo subroutine.

!history R.ATA (LNHE)
!+ 09/11/2014
!+ V7P0
!+ introducion of water quality option + pluie is introduced as
!+ an optional parameter + remove of my_option which is replaced
!+ by a new keyword + value of patmos managed also with a new keyword

and this in the manual


"6.3.3. RAIN AND EVAPORATION
The modelling of the influence of precipitation or evaporation is activated with the logical keyword
RAIN OR EVAPORATION. The value of the contribution or the loss of water at the surface is
specified using the keyword RAIN OR EVAPORATION IN MM PER DAY which default value
is 0. (a negative value reflects an evaporation). Rain and evaporation can also vary in time and
space. They can be introduced through the meteo file. See water quality, wind and rain validation
test cases (in folder examples/telemac2d)"

i found this meteo file and it does have a rainfall column.
does this mean i can enter my precipitation value for each time step in the rainfall column? i think i can call it in the cas file whit this lines
RAIN OR EVAPORATION : YES
FORMATTED DATA FILE 1 = 'meteo_thermic_case1.txt'

i ask because my programming skills are not yet too refine, but if this is not possible i would try to insert it my self in the subroutine.

thank you in advanced.

chelo.


File Attachment:

File Name: meteo_thermic_case1.txt
File Size: 343 KB
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.