1 | |
---|
2 | ! $Id: ocs_to_so2.F90 5101 2024-07-23 06:22:55Z abarral $ |
---|
3 | |
---|
4 | SUBROUTINE ocs_to_so2(pdtphys,tr_seri,t_seri,pplay,paprs,is_strato) |
---|
5 | |
---|
6 | USE dimphy, ONLY: klon,klev |
---|
7 | USE aerophys |
---|
8 | USE infotrac_phy |
---|
9 | USE lmdz_yomcst, ONLY: RG |
---|
10 | USE phys_local_var_mod, ONLY: OCS_lifetime, budg_3D_ocs_to_so2, budg_ocs_to_so2 |
---|
11 | USE strataer_local_var_mod, ONLY: flag_min_rreduce |
---|
12 | |
---|
13 | IMPLICIT NONE |
---|
14 | |
---|
15 | !-------------------------------------------------------- |
---|
16 | ! transfer variables when calling this routine |
---|
17 | REAL,INTENT(IN) :: pdtphys ! Pas d'integration pour la physique (seconde) |
---|
18 | REAL,DIMENSION(klon,klev,nbtr),INTENT(INOUT) :: tr_seri ! Concentration Traceur [U/KgA] |
---|
19 | REAL,DIMENSION(klon,klev),INTENT(IN) :: t_seri ! Temperature |
---|
20 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pplay ! pression pour le mileu de chaque couche (en Pa) |
---|
21 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: paprs ! pression pour chaque inter-couche (en Pa) |
---|
22 | LOGICAL,DIMENSION(klon,klev),INTENT(IN) :: is_strato |
---|
23 | |
---|
24 | ! local variables |
---|
25 | INTEGER :: i,j,k,nb,ilon,ilev |
---|
26 | REAL :: rreduce |
---|
27 | |
---|
28 | !--convert OCS to SO2 |
---|
29 | budg_3D_ocs_to_so2(:,:)=0.0 |
---|
30 | budg_ocs_to_so2(:)=0.0 |
---|
31 | |
---|
32 | DO ilon=1, klon |
---|
33 | DO ilev=1, klev |
---|
34 | !only in the stratosphere |
---|
35 | IF (is_strato(ilon,ilev)) THEN |
---|
36 | IF (OCS_lifetime(ilon,ilev)>0.0.AND.OCS_lifetime(ilon,ilev)<1.E10) THEN |
---|
37 | rreduce = OCS_lifetime(ilon,ilev) |
---|
38 | ! Check lifetime rreduce < timestep*3 (such as H2SO4 loss > 0.28*H2SO4) with exp(-1/3)=0.72 |
---|
39 | IF(flag_min_rreduce) THEN |
---|
40 | IF (rreduce < (3.*pdtphys)) rreduce = 3.*pdtphys |
---|
41 | ENDIF |
---|
42 | budg_3D_ocs_to_so2(ilon,ilev)=tr_seri(ilon,ilev,id_OCS_strat)*(1.0-exp(-pdtphys/rreduce)) |
---|
43 | tr_seri(ilon,ilev,id_OCS_strat)=tr_seri(ilon,ilev,id_OCS_strat) - budg_3D_ocs_to_so2(ilon,ilev) |
---|
44 | tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) + mSO2mol/mOCSmol*budg_3D_ocs_to_so2(ilon,ilev) |
---|
45 | !convert budget from kg(OCS)/kgA to kg(S)/m2/layer/s for saving as diagnostic |
---|
46 | budg_3D_ocs_to_so2(ilon,ilev)=budg_3D_ocs_to_so2(ilon,ilev)*mSatom/mOCSmol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys |
---|
47 | budg_ocs_to_so2(ilon)=budg_ocs_to_so2(ilon)+budg_3D_ocs_to_so2(ilon,ilev) |
---|
48 | ENDIF |
---|
49 | ! END IF(OCS_lifetime(ilon,ilev).GT.0.0.AND.OCS_lifetime(ilon,ilev).LT.1.E10) |
---|
50 | ENDIF |
---|
51 | ! END IF(is_strato(ilon,ilev)) |
---|
52 | ENDDO |
---|
53 | ENDDO |
---|
54 | |
---|
55 | END SUBROUTINE ocs_to_so2 |
---|