source: LMDZ6/branches/contrails/libf/phylmd/Dust/checkmass.f90 @ 5445

Last change on this file since 5445 was 5285, checked in by abarral, 8 weeks ago

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

File size: 1.2 KB
Line 
1SUBROUTINE checkmass(zq,RNAVOG,mass,zdz,pplay,t_seri,iscm3,comment)
2  USE dimphy
3USE geometry_mod , ONLY:cell_area
4  USE yomcst_mod_h
5IMPLICIT NONE
6
7
8
9! Entrees
10  REAL,DIMENSION(klon,klev), INTENT(IN)   :: zq
11  REAL,DIMENSION(klon,klev), INTENT(IN)   :: zdz
12  REAL,INTENT(IN)                         :: mass
13  REAL,INTENT(IN)                         :: RNAVOG
14  CHARACTER(LEN=*),INTENT(IN)             :: comment
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)*cell_area(i)
56ENDDO
57WRITE(*,9999) comment," totmass= ",totmass
589999  format(a20,a10,e15.8)
59
60END SUBROUTINE checkmass
Note: See TracBrowser for help on using the repository browser.