[2630] | 1 | SUBROUTINE checkmass(zq,RNAVOG,mass,zdz,pplay,t_seri,iscm3,comment) |
---|
| 2 | USE dimphy |
---|
| 3 | USE geometry_mod , ONLY:cell_area |
---|
[5285] | 4 | USE yomcst_mod_h |
---|
[5274] | 5 | IMPLICIT NONE |
---|
[2630] | 6 | |
---|
| 7 | |
---|
[5274] | 8 | |
---|
[2630] | 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 |
---|
| 15 | REAL,DIMENSION(klon,klev) ,INTENT(IN) :: pplay |
---|
| 16 | REAL,DIMENSION(klon,klev) ,INTENT(IN) :: t_seri |
---|
| 17 | LOGICAL :: 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 | |
---|
| 28 | DO i=1, klon |
---|
| 29 | burden(i)=0.0 |
---|
| 30 | DO k=1, klev |
---|
| 31 | zqv(i,k)=zq(i,k) |
---|
| 32 | |
---|
| 33 | ENDDO |
---|
| 34 | |
---|
| 35 | ENDDO |
---|
| 36 | |
---|
| 37 | totmass=0.0 |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | IF (iscm3) THEN |
---|
| 41 | |
---|
| 42 | ELSE |
---|
| 43 | |
---|
| 44 | CALL kg_to_cm3(pplay,t_seri,zqv) |
---|
| 45 | |
---|
| 46 | ENDIF |
---|
| 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) |
---|
| 56 | ENDDO |
---|
| 57 | WRITE(*,9999) comment," totmass= ",totmass |
---|
| 58 | 9999 format(a20,a10,e15.8) |
---|
| 59 | |
---|
| 60 | END SUBROUTINE checkmass |
---|