source: LMDZ5/trunk/libf/phylmd/StratAer/ocs_to_so2.F90 @ 2690

Last change on this file since 2690 was 2690, checked in by oboucher, 8 years ago

Adding a module for stratospheric aerosols with a bin scheme.
The module gets activated with -strataer true compiling option.
May not quite work yet, more testing needed, but should not affect
the rest of LMDz as everything is under a CPP_StratAer key.

File size: 2.0 KB
Line 
1SUBROUTINE OCS_TO_SO2(pdtphys,tr_seri,t_seri,pplay,paprs,sh,OCS_lifetime,is_strato,ocs_convert_sub)
2
3  USE dimphy, ONLY : klon,klev
4  USE aerophys
5  USE infotrac
6  USE YOMCST, ONLY : RG
7
8  IMPLICIT NONE
9
10  !--------------------------------------------------------
11  ! transfer variables when calling this routine
12  REAL,INTENT(IN)                               :: pdtphys ! Pas d'integration pour la physique (seconde)
13  REAL,DIMENSION(klon,klev,nbtr),INTENT(INOUT)  :: tr_seri ! Concentration Traceur [U/KgA]
14  REAL,DIMENSION(klon,klev),INTENT(IN)          :: t_seri  ! Temperature
15  REAL,DIMENSION(klon,klev),INTENT(IN)          :: pplay   ! pression pour le mileu de chaque couche (en Pa)
16  REAL,DIMENSION(klon,klev+1),INTENT(IN)        :: paprs   ! pression pour chaque inter-couche (en Pa)
17  REAL,DIMENSION(klon,klev),INTENT(IN)          :: sh      ! humidite specifique   
18  REAL,DIMENSION(klon,klev),INTENT(IN)          :: OCS_lifetime
19  LOGICAL,DIMENSION(klon,klev),INTENT(IN)       :: is_strato
20
21  ! local variables
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
25!--convert OCS to SO2
26  DO ilon=1, klon
27  DO ilev=1, klev
28  !only in the stratosphere
29  IF (is_strato(ilon,ilev)) THEN
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
34    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)
37    !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
40  ENDIF
41  ENDDO
42  ENDDO
43
44END SUBROUTINE OCS_TO_SO2
Note: See TracBrowser for help on using the repository browser.