[3526] | 1 | ! |
---|
| 2 | ! $Id: ocs_to_so2.F90 3677 2020-05-06 15:18:32Z 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 |
---|
[2752] | 10 | USE phys_local_var_mod, ONLY : OCS_lifetime, budg_3D_ocs_to_so2, budg_ocs_to_so2 |
---|
[2690] | 11 | |
---|
| 12 | IMPLICIT NONE |
---|
| 13 | |
---|
| 14 | !-------------------------------------------------------- |
---|
| 15 | ! transfer variables when calling this routine |
---|
| 16 | REAL,INTENT(IN) :: pdtphys ! Pas d'integration pour la physique (seconde) |
---|
| 17 | REAL,DIMENSION(klon,klev,nbtr),INTENT(INOUT) :: tr_seri ! Concentration Traceur [U/KgA] |
---|
| 18 | REAL,DIMENSION(klon,klev),INTENT(IN) :: t_seri ! Temperature |
---|
| 19 | REAL,DIMENSION(klon,klev),INTENT(IN) :: pplay ! pression pour le mileu de chaque couche (en Pa) |
---|
| 20 | REAL,DIMENSION(klon,klev+1),INTENT(IN) :: paprs ! pression pour chaque inter-couche (en Pa) |
---|
| 21 | LOGICAL,DIMENSION(klon,klev),INTENT(IN) :: is_strato |
---|
| 22 | |
---|
| 23 | ! local variables |
---|
| 24 | INTEGER :: i,j,k,nb,ilon,ilev |
---|
| 25 | |
---|
| 26 | !--convert OCS to SO2 |
---|
[2752] | 27 | budg_3D_ocs_to_so2(:,:)=0.0 |
---|
| 28 | budg_ocs_to_so2(:)=0.0 |
---|
| 29 | |
---|
[2690] | 30 | DO ilon=1, klon |
---|
| 31 | DO ilev=1, klev |
---|
| 32 | !only in the stratosphere |
---|
| 33 | IF (is_strato(ilon,ilev)) THEN |
---|
| 34 | IF (OCS_lifetime(ilon,ilev).GT.0.0) THEN |
---|
[2752] | 35 | budg_3D_ocs_to_so2(ilon,ilev)=tr_seri(ilon,ilev,id_OCS_strat)*(1.0-exp(-pdtphys/OCS_lifetime(ilon,ilev))) |
---|
[2690] | 36 | ENDIF |
---|
[2752] | 37 | tr_seri(ilon,ilev,id_OCS_strat)=tr_seri(ilon,ilev,id_OCS_strat) - budg_3D_ocs_to_so2(ilon,ilev) |
---|
| 38 | tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) + mSO2mol/mOCSmol*budg_3D_ocs_to_so2(ilon,ilev) |
---|
| 39 | !convert budget from kg(OCS)/kgA to kg(S)/m2/layer/s for saving as diagnostic |
---|
| 40 | 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 |
---|
| 41 | budg_ocs_to_so2(ilon)=budg_ocs_to_so2(ilon)+budg_3D_ocs_to_so2(ilon,ilev) |
---|
[2690] | 42 | ENDIF |
---|
| 43 | ENDDO |
---|
| 44 | ENDDO |
---|
| 45 | |
---|
[2695] | 46 | END SUBROUTINE ocs_to_so2 |
---|