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/so2_to_h2so4.F90

    r2695 r2752  
    1 SUBROUTINE SO2_TO_H2SO4(pdtphys,tr_seri,t_seri,pplay,paprs,sh,is_strato)
     1SUBROUTINE SO2_TO_H2SO4(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 : SO2_lifetime, sulf_convert
     7  USE phys_local_var_mod, ONLY : SO2_lifetime, budg_3D_so2_to_h2so4, budg_so2_to_h2so4
    88
    99  IMPLICIT NONE
     
    1717  REAL,DIMENSION(klon,klev),INTENT(IN)          :: pplay   ! pression pour le mileu de chaque couche (en Pa)
    1818  REAL,DIMENSION(klon,klev+1),INTENT(IN)        :: paprs   ! pression pour chaque inter-couche (en Pa)
    19   REAL,DIMENSION(klon,klev),INTENT(IN)          :: sh      ! humidite specifique   
    2019  LOGICAL,DIMENSION(klon,klev),INTENT(IN)       :: is_strato ! stratospheric flag
    2120
     
    2423
    2524!--convert SO2 to H2SO4
    26   sulf_convert(:,:)=0.0
     25  budg_3D_so2_to_h2so4(:,:)=0.0
     26  budg_so2_to_h2so4(:)=0.0
     27
    2728  DO ilon=1, klon
    2829  DO ilev=1, klev
     
    3031  IF (is_strato(ilon,ilev)) THEN
    3132    IF (SO2_lifetime(ilon,ilev).GT.0.0) THEN
    32       sulf_convert(ilon,ilev)=tr_seri(ilon,ilev,id_SO2_strat)*(1.0-exp(-pdtphys/SO2_lifetime(ilon,ilev)))
     33      budg_3D_so2_to_h2so4(ilon,ilev)=tr_seri(ilon,ilev,id_SO2_strat)*(1.0-exp(-pdtphys/SO2_lifetime(ilon,ilev)))
    3334    ENDIF
    34     tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) - sulf_convert(ilon,ilev)
    35     tr_seri(ilon,ilev,id_H2SO4_strat)=tr_seri(ilon,ilev,id_H2SO4_strat) + mH2SO4mol/mSO2mol*sulf_convert(ilon,ilev)
    36     !convert sulf_convert from kg(SO2)/kgA to kg(S)/m2/layer/s for saving as diagnostic
    37     sulf_convert(ilon,ilev)=sulf_convert(ilon,ilev)*mSatom/mSO2mol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
     35    tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) - budg_3D_so2_to_h2so4(ilon,ilev)
     36    tr_seri(ilon,ilev,id_H2SO4_strat)=tr_seri(ilon,ilev,id_H2SO4_strat) + mH2SO4mol/mSO2mol*budg_3D_so2_to_h2so4(ilon,ilev)
     37    !convert budget from kg(SO2)/kgA to kg(S)/m2/layer/s for saving as diagnostic
     38    budg_3D_so2_to_h2so4(ilon,ilev)=budg_3D_so2_to_h2so4(ilon,ilev)*mSatom/mSO2mol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
     39    budg_so2_to_h2so4(ilon)=budg_so2_to_h2so4(ilon)+budg_3D_so2_to_h2so4(ilon,ilev)
    3840  ENDIF
    3941  ENDDO
Note: See TracChangeset for help on using the changeset viewer.