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