source: LMDZ5/trunk/libf/phylmd/StratAer/so2_to_h2so4.F90 @ 2720

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

Removing useless global variables
Interpolation only done once a month
Changing test orders in implicit coagulation routine as some compilers didn't like it

File size: 1.8 KB
Line 
1SUBROUTINE SO2_TO_H2SO4(pdtphys,tr_seri,t_seri,pplay,paprs,sh,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, sulf_convert
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  REAL,DIMENSION(klon,klev),INTENT(IN)          :: sh      ! humidite specifique   
20  LOGICAL,DIMENSION(klon,klev),INTENT(IN)       :: is_strato ! stratospheric flag
21
22  ! local variables in coagulation routine
23  INTEGER                                       :: i,j,k,nb,ilon,ilev
24
25!--convert SO2 to H2SO4
26  sulf_convert(:,:)=0.0
27  DO ilon=1, klon
28  DO ilev=1, klev
29  !only in the stratosphere
30  IF (is_strato(ilon,ilev)) THEN
31    IF (SO2_lifetime(ilon,ilev).GT.0.0) THEN
32      sulf_convert(ilon,ilev)=tr_seri(ilon,ilev,id_SO2_strat)*(1.0-exp(-pdtphys/SO2_lifetime(ilon,ilev)))
33    ENDIF
34    tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) - sulf_convert(ilon,ilev)
35    tr_seri(ilon,ilev,id_H2SO4_strat)=tr_seri(ilon,ilev,id_H2SO4_strat) + mH2SO4mol/mSO2mol*sulf_convert(ilon,ilev)
36    !convert sulf_convert from kg(SO2)/kgA to kg(S)/m2/layer/s for saving as diagnostic
37    sulf_convert(ilon,ilev)=sulf_convert(ilon,ilev)*mSatom/mSO2mol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
38  ENDIF
39  ENDDO
40  ENDDO
41
42END SUBROUTINE SO2_TO_H2SO4
Note: See TracBrowser for help on using the repository browser.