Ignore:
Timestamp:
Jan 8, 2017, 4:44:10 PM (8 years ago)
Author:
oboucher
Message:

Changes to StratAer? module, including setting up a new output file
hence dimension of output metadata is increased to 10 items.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/StratAer/ocs_to_so2.F90

    r2695 r2752  
    1 SUBROUTINE ocs_to_so2(pdtphys,tr_seri,t_seri,pplay,paprs,sh,is_strato)
     1SUBROUTINE ocs_to_so2(pdtphys,tr_seri,t_seri,pplay,paprs,is_strato)
    22
    33  USE dimphy, ONLY : klon,klev
     
    55  USE infotrac
    66  USE YOMCST, ONLY : RG
    7   USE phys_local_var_mod, ONLY : OCS_lifetime, ocs_convert
     7  USE phys_local_var_mod, ONLY : OCS_lifetime, budg_3D_ocs_to_so2, budg_ocs_to_so2
    88
    99  IMPLICIT NONE
     
    1616  REAL,DIMENSION(klon,klev),INTENT(IN)          :: pplay   ! pression pour le mileu de chaque couche (en Pa)
    1717  REAL,DIMENSION(klon,klev+1),INTENT(IN)        :: paprs   ! pression pour chaque inter-couche (en Pa)
    18   REAL,DIMENSION(klon,klev),INTENT(IN)          :: sh      ! humidite specifique   
    1918  LOGICAL,DIMENSION(klon,klev),INTENT(IN)       :: is_strato
    2019
     
    2322
    2423!--convert OCS to SO2
    25   ocs_convert(:,:)=0.0
     24  budg_3D_ocs_to_so2(:,:)=0.0
     25  budg_ocs_to_so2(:)=0.0
     26
    2627  DO ilon=1, klon
    2728  DO ilev=1, klev
     
    2930  IF (is_strato(ilon,ilev)) THEN
    3031    IF (OCS_lifetime(ilon,ilev).GT.0.0) THEN
    31       ocs_convert(ilon,ilev)=tr_seri(ilon,ilev,id_OCS_strat)*(1.0-exp(-pdtphys/OCS_lifetime(ilon,ilev)))
     32      budg_3D_ocs_to_so2(ilon,ilev)=tr_seri(ilon,ilev,id_OCS_strat)*(1.0-exp(-pdtphys/OCS_lifetime(ilon,ilev)))
    3233    ENDIF
    33     tr_seri(ilon,ilev,id_OCS_strat)=tr_seri(ilon,ilev,id_OCS_strat) - ocs_convert(ilon,ilev)
    34     tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) + mSO2mol/mOCSmol*ocs_convert(ilon,ilev)
    35     !convert ocs_convert from kg(OCS)/kgA to kg(S)/m2/layer/s for saving as diagnostic
    36     ocs_convert(ilon,ilev)=ocs_convert(ilon,ilev)*mSatom/mOCSmol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
     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)
    3739  ENDIF
    3840  ENDDO
Note: See TracChangeset for help on using the changeset viewer.