[2175] | 1 | SUBROUTINE checkmass(zq,RNAVOG,mass,zdz,pplay,t_seri,iscm3,comment) |
---|
| 2 | USE dimphy |
---|
| 3 | USE 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 |
---|
| 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)*airephy(i) |
---|
| 56 | ! print*,'JE brd aire',burden(i),airephy(i) |
---|
| 57 | ENDDO |
---|
| 58 | WRITE(*,9999) comment," totmass= ",totmass |
---|
| 59 | 9999 format(a20,a10,e15.8) |
---|
| 60 | |
---|
| 61 | END SUBROUTINE checkmass |
---|