source: LMDZ6/branches/Amaury_dev/libf/phylmd/qcheck.F90 @ 5151

Last change on this file since 5151 was 5144, checked in by abarral, 3 months ago

Put YOMCST.h into modules

File size: 647 bytes
RevLine 
[5144]1FUNCTION qcheck(klon, klev, paprs, q, ql, aire)
2  USE lmdz_yomcst
3
[5134]4  IMPLICIT NONE
[5099]5
[2419]6  ! Calculer et imprimer l'eau totale. A utiliser pour verifier
7  ! la conservation de l'eau
[5099]8
[5144]9  INTEGER, INTENT(IN) :: klon, klev
10  REAL, INTENT(IN) :: paprs(klon, klev + 1), q(klon, klev), ql(klon, klev)
11  REAL, INTENT(IN) :: aire(klon)
[2419]12  REAL qtotal, zx, qcheck
13  INTEGER i, k
[5099]14
[2419]15  zx = 0.0
16  DO i = 1, klon
[5144]17    zx = zx + aire(i)
[2419]18  ENDDO
19  qtotal = 0.0
20  DO k = 1, klev
[5144]21    DO i = 1, klon
22      qtotal = qtotal + (q(i, k) + ql(i, k)) * aire(i) &
23              * (paprs(i, k) - paprs(i, k + 1)) / RG
24    ENDDO
[2419]25  ENDDO
[5099]26
[5144]27  qcheck = qtotal / zx
[5099]28
[2419]29END FUNCTION qcheck
30
Note: See TracBrowser for help on using the repository browser.