[2630] | 1 | SUBROUTINE checkmass(zq,RNAVOG,mass,zdz,pplay,t_seri,iscm3,comment) |
---|
| 2 | USE dimphy |
---|
| 3 | USE geometry_mod , ONLY:cell_area |
---|
| 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,klev) ,INTENT(IN) :: pplay |
---|
| 15 | REAL,DIMENSION(klon,klev) ,INTENT(IN) :: t_seri |
---|
| 16 | LOGICAL :: iscm3 |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | ! Local |
---|
| 20 | ! INTEGER,DIMENSION(klon) :: jadrs |
---|
| 21 | INTEGER :: i, k |
---|
| 22 | REAL :: totmass |
---|
| 23 | REAL,DIMENSION(klon) :: burden |
---|
| 24 | REAL,DIMENSION(klon,klev) :: zqv |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | DO i=1, klon |
---|
| 28 | burden(i)=0.0 |
---|
| 29 | DO k=1, klev |
---|
| 30 | zqv(i,k)=zq(i,k) |
---|
| 31 | |
---|
| 32 | ENDDO |
---|
| 33 | |
---|
| 34 | ENDDO |
---|
| 35 | |
---|
| 36 | totmass=0.0 |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | IF (iscm3) THEN |
---|
| 40 | |
---|
| 41 | ELSE |
---|
| 42 | |
---|
| 43 | CALL kg_to_cm3(pplay,t_seri,zqv) |
---|
| 44 | |
---|
| 45 | ENDIF |
---|
| 46 | |
---|
| 47 | DO k=1, klev |
---|
| 48 | DO i=1, klon |
---|
| 49 | burden(i)=burden(i)+(zqv(i,k)*1.e6*zdz(i,k)* & |
---|
| 50 | mass*1.e3/RNAVOG) !--mg S/m2 |
---|
| 51 | ENDDO |
---|
| 52 | ENDDO |
---|
| 53 | DO i=1, klon |
---|
| 54 | totmass=totmass+burden(i)*cell_area(i) |
---|
| 55 | ENDDO |
---|
| 56 | WRITE(*,9999) comment," totmass= ",totmass |
---|
| 57 | 9999 format(a20,a10,e15.8) |
---|
| 58 | |
---|
| 59 | END SUBROUTINE checkmass |
---|