source: LMDZ5/branches/IPSLCM6.0.11.rc1/libf/phylmd/StratAer/so2_to_h2so4.F90 @ 5223

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

Changes to StratAer? module, including setting up a new output file
hence dimension of output metadata is increased to 10 items.

File size: 1.9 KB
Line 
1SUBROUTINE SO2_TO_H2SO4(pdtphys,tr_seri,t_seri,pplay,paprs,is_strato)
2
3  USE dimphy, ONLY : klon,klev
4  USE aerophys
5  USE infotrac
6  USE YOMCST, ONLY : RG
7  USE phys_local_var_mod, ONLY : SO2_lifetime, budg_3D_so2_to_h2so4, budg_so2_to_h2so4
8
9  IMPLICIT NONE
10
11  !--------------------------------------------------------
12
13  ! transfer variables when calling this routine
14  REAL,INTENT(IN)                               :: pdtphys ! Pas d'integration pour la physique (seconde)
15  REAL,DIMENSION(klon,klev,nbtr),INTENT(INOUT)  :: tr_seri ! Concentration Traceur [U/KgA]
16  REAL,DIMENSION(klon,klev),INTENT(IN)          :: t_seri  ! Temperature
17  REAL,DIMENSION(klon,klev),INTENT(IN)          :: pplay   ! pression pour le mileu de chaque couche (en Pa)
18  REAL,DIMENSION(klon,klev+1),INTENT(IN)        :: paprs   ! pression pour chaque inter-couche (en Pa)
19  LOGICAL,DIMENSION(klon,klev),INTENT(IN)       :: is_strato ! stratospheric flag
20
21  ! local variables in coagulation routine
22  INTEGER                                       :: i,j,k,nb,ilon,ilev
23
24!--convert SO2 to H2SO4
25  budg_3D_so2_to_h2so4(:,:)=0.0
26  budg_so2_to_h2so4(:)=0.0
27
28  DO ilon=1, klon
29  DO ilev=1, klev
30  !only in the stratosphere
31  IF (is_strato(ilon,ilev)) THEN
32    IF (SO2_lifetime(ilon,ilev).GT.0.0) THEN
33      budg_3D_so2_to_h2so4(ilon,ilev)=tr_seri(ilon,ilev,id_SO2_strat)*(1.0-exp(-pdtphys/SO2_lifetime(ilon,ilev)))
34    ENDIF
35    tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) - budg_3D_so2_to_h2so4(ilon,ilev)
36    tr_seri(ilon,ilev,id_H2SO4_strat)=tr_seri(ilon,ilev,id_H2SO4_strat) + mH2SO4mol/mSO2mol*budg_3D_so2_to_h2so4(ilon,ilev)
37    !convert budget from kg(SO2)/kgA to kg(S)/m2/layer/s for saving as diagnostic
38    budg_3D_so2_to_h2so4(ilon,ilev)=budg_3D_so2_to_h2so4(ilon,ilev)*mSatom/mSO2mol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
39    budg_so2_to_h2so4(ilon)=budg_so2_to_h2so4(ilon)+budg_3D_so2_to_h2so4(ilon,ilev)
40  ENDIF
41  ENDDO
42  ENDDO
43
44END SUBROUTINE SO2_TO_H2SO4
Note: See TracBrowser for help on using the repository browser.