source: LMDZ5/branches/LMDZ5_SPLA/libf/phylmd/checkmass.F90 @ 5339

Last change on this file since 5339 was 2175, checked in by jescribano, 10 years ago

SPLA code included for first time

File size: 1.3 KB
Line 
1SUBROUTINE checkmass(zq,RNAVOG,mass,zdz,pplay,t_seri,iscm3,comment)
2  USE dimphy
3USE comgeomphy , ONLY:airephy
4  IMPLICIT NONE
5
6#include "YOMCST.h"
7
8! Entrees
9  REAL,DIMENSION(klon,klev), INTENT(IN)   :: zq
10  REAL,DIMENSION(klon,klev), INTENT(IN)   :: zdz
11  REAL,INTENT(IN)                         :: mass
12  REAL,INTENT(IN)                         :: RNAVOG
13  CHARACTER(LEN=*),INTENT(IN)             :: comment
14!  REAL,DIMENSION(klon)       :: airephy
15REAL,DIMENSION(klon,klev) ,INTENT(IN)  :: pplay
16REAL,DIMENSION(klon,klev) ,INTENT(IN) :: t_seri
17LOGICAL :: iscm3
18
19
20! Local 
21!  INTEGER,DIMENSION(klon)     :: jadrs
22  INTEGER                     :: i, k
23  REAL                              :: totmass
24  REAL,DIMENSION(klon)              ::  burden
25  REAL,DIMENSION(klon,klev)   :: zqv
26
27
28DO i=1, klon
29burden(i)=0.0
30  DO k=1, klev
31zqv(i,k)=zq(i,k)
32
33ENDDO
34
35ENDDO
36
37totmass=0.0
38
39
40IF (iscm3) THEN
41
42ELSE
43
44CALL kg_to_cm3(pplay,t_seri,zqv)
45
46ENDIF
47
48  DO k=1, klev
49      DO i=1, klon
50        burden(i)=burden(i)+(zqv(i,k)*1.e6*zdz(i,k)* &
51                 mass*1.e3/RNAVOG)     !--mg S/m2
52    ENDDO
53  ENDDO
54    DO i=1, klon
55        totmass=totmass+burden(i)*airephy(i)
56! print*,'JE brd aire',burden(i),airephy(i)   
57ENDDO
58WRITE(*,9999) comment," totmass= ",totmass
599999  format(a20,a10,e15.8)
60
61END SUBROUTINE checkmass
Note: See TracBrowser for help on using the repository browser.