source: LMDZ6/trunk/libf/phylmd/qcheck.f90 @ 5302

Last change on this file since 5302 was 5285, checked in by abarral, 5 weeks ago

As discussed internally, remove generic ONLY: ... for new _mod_h modules

File size: 636 bytes
Line 
1FUNCTION qcheck(klon,klev,paprs,q,ql,aire)
2  USE yomcst_mod_h
3IMPLICIT none
4  !
5  ! Calculer et imprimer l'eau totale. A utiliser pour verifier
6  ! la conservation de l'eau
7  !
8
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)
12  REAL qtotal, zx, qcheck
13  INTEGER i, k
14  !
15  zx = 0.0
16  DO i = 1, klon
17     zx = zx + aire(i)
18  ENDDO
19  qtotal = 0.0
20  DO k = 1, klev
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
25  ENDDO
26  !
27  qcheck = qtotal/zx
28  !
29END FUNCTION qcheck
30
Note: See TracBrowser for help on using the repository browser.