Changeset 2695 for LMDZ5/trunk/libf/phylmd/StratAer/ocs_to_so2.F90
- Timestamp:
- Nov 1, 2016, 11:19:45 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/StratAer/ocs_to_so2.F90
r2690 r2695 1 SUBROUTINE OCS_TO_SO2(pdtphys,tr_seri,t_seri,pplay,paprs,sh,OCS_lifetime,is_strato,ocs_convert_sub)1 SUBROUTINE ocs_to_so2(pdtphys,tr_seri,t_seri,pplay,paprs,sh,is_strato) 2 2 3 3 USE dimphy, ONLY : klon,klev … … 5 5 USE infotrac 6 6 USE YOMCST, ONLY : RG 7 USE phys_local_var_mod, ONLY : OCS_lifetime, ocs_convert 7 8 8 9 IMPLICIT NONE … … 16 17 REAL,DIMENSION(klon,klev+1),INTENT(IN) :: paprs ! pression pour chaque inter-couche (en Pa) 17 18 REAL,DIMENSION(klon,klev),INTENT(IN) :: sh ! humidite specifique 18 REAL,DIMENSION(klon,klev),INTENT(IN) :: OCS_lifetime19 19 LOGICAL,DIMENSION(klon,klev),INTENT(IN) :: is_strato 20 20 21 21 ! local variables 22 22 INTEGER :: i,j,k,nb,ilon,ilev 23 REAL,DIMENSION(klon,klev) :: ocs_convert_sub ! OCS converted to SO2 [kg(S)/m2/layer/s]24 23 25 24 !--convert OCS to SO2 25 ocs_convert(:,:)=0.0 26 26 DO ilon=1, klon 27 27 DO ilev=1, klev … … 29 29 IF (is_strato(ilon,ilev)) THEN 30 30 IF (OCS_lifetime(ilon,ilev).GT.0.0) THEN 31 ocs_convert_sub(ilon,ilev)=tr_seri(ilon,ilev,id_OCS_strat)*(1-exp(-pdtphys/OCS_lifetime(ilon,ilev))) 32 ELSE 33 ocs_convert_sub(ilon,ilev)=0.0 31 ocs_convert(ilon,ilev)=tr_seri(ilon,ilev,id_OCS_strat)*(1.0-exp(-pdtphys/OCS_lifetime(ilon,ilev))) 34 32 ENDIF 35 tr_seri(ilon,ilev,id_OCS_strat)=tr_seri(ilon,ilev,id_OCS_strat) - ocs_convert _sub(ilon,ilev)36 tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) + mSO2mol/mOCSmol*ocs_convert _sub(ilon,ilev)33 tr_seri(ilon,ilev,id_OCS_strat)=tr_seri(ilon,ilev,id_OCS_strat) - ocs_convert(ilon,ilev) 34 tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) + mSO2mol/mOCSmol*ocs_convert(ilon,ilev) 37 35 !convert ocs_convert from kg(OCS)/kgA to kg(S)/m2/layer/s for saving as diagnostic 38 ocs_convert_sub(ilon,ilev)=ocs_convert_sub(ilon,ilev)*mSatom/mOCSmol* & 39 & (paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys 36 ocs_convert(ilon,ilev)=ocs_convert(ilon,ilev)*mSatom/mOCSmol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys 40 37 ENDIF 41 38 ENDDO 42 39 ENDDO 43 40 44 END SUBROUTINE OCS_TO_SO241 END SUBROUTINE ocs_to_so2
Note: See TracChangeset
for help on using the changeset viewer.