[3526] | 1 | ! |
---|
| 2 | ! $Id: ocs_to_so2.F90 4601 2023-06-30 22:07:30Z fairhead $ |
---|
| 3 | ! |
---|
[2752] | 4 | SUBROUTINE ocs_to_so2(pdtphys,tr_seri,t_seri,pplay,paprs,is_strato) |
---|
[2690] | 5 | |
---|
| 6 | USE dimphy, ONLY : klon,klev |
---|
| 7 | USE aerophys |
---|
[3677] | 8 | USE infotrac_phy |
---|
[2690] | 9 | USE YOMCST, ONLY : RG |
---|
[4601] | 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 |
---|
[2690] | 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 |
---|
[4601] | 26 | REAL :: rreduce |
---|
| 27 | |
---|
[2690] | 28 | !--convert OCS to SO2 |
---|
[2752] | 29 | budg_3D_ocs_to_so2(:,:)=0.0 |
---|
| 30 | budg_ocs_to_so2(:)=0.0 |
---|
| 31 | |
---|
[2690] | 32 | DO ilon=1, klon |
---|
[4601] | 33 | DO ilev=1, klev |
---|
| 34 | !only in the stratosphere |
---|
| 35 | IF (is_strato(ilon,ilev)) THEN |
---|
| 36 | IF (OCS_lifetime(ilon,ilev).GT.0.0.AND.OCS_lifetime(ilon,ilev).LT.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 .LT. (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 |
---|
[2690] | 53 | ENDDO |
---|
| 54 | |
---|
[2695] | 55 | END SUBROUTINE ocs_to_so2 |
---|