Ignore:
Timestamp:
Nov 1, 2016, 11:19:45 AM (8 years ago)
Author:
oboucher
Message:

Removing useless global variables
Interpolation only done once a month
Changing test orders in implicit coagulation routine as some compilers didn't like it

File:
1 edited

Legend:

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

    r2690 r2695  
    1 SUBROUTINE OCS_TO_SO2(pdtphys,tr_seri,t_seri,pplay,paprs,sh,OCS_lifetime,is_strato,ocs_convert_sub)
     1SUBROUTINE ocs_to_so2(pdtphys,tr_seri,t_seri,pplay,paprs,sh,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
    78
    89  IMPLICIT NONE
     
    1617  REAL,DIMENSION(klon,klev+1),INTENT(IN)        :: paprs   ! pression pour chaque inter-couche (en Pa)
    1718  REAL,DIMENSION(klon,klev),INTENT(IN)          :: sh      ! humidite specifique   
    18   REAL,DIMENSION(klon,klev),INTENT(IN)          :: OCS_lifetime
    1919  LOGICAL,DIMENSION(klon,klev),INTENT(IN)       :: is_strato
    2020
    2121  ! local variables
    2222  INTEGER                                       :: i,j,k,nb,ilon,ilev
    23   REAL,DIMENSION(klon,klev)                     :: ocs_convert_sub ! OCS converted to SO2 [kg(S)/m2/layer/s]
    2423
    2524!--convert OCS to SO2
     25  ocs_convert(:,:)=0.0
    2626  DO ilon=1, klon
    2727  DO ilev=1, klev
     
    2929  IF (is_strato(ilon,ilev)) THEN
    3030    IF (OCS_lifetime(ilon,ilev).GT.0.0) THEN
    31       ocs_convert_sub(ilon,ilev)=tr_seri(ilon,ilev,id_OCS_strat)*(1-exp(-pdtphys/OCS_lifetime(ilon,ilev)))
    32     ELSE
    33       ocs_convert_sub(ilon,ilev)=0.0
     31      ocs_convert(ilon,ilev)=tr_seri(ilon,ilev,id_OCS_strat)*(1.0-exp(-pdtphys/OCS_lifetime(ilon,ilev)))
    3432    ENDIF
    35     tr_seri(ilon,ilev,id_OCS_strat)=tr_seri(ilon,ilev,id_OCS_strat) - ocs_convert_sub(ilon,ilev)
    36     tr_seri(ilon,ilev,id_SO2_strat)=tr_seri(ilon,ilev,id_SO2_strat) + mSO2mol/mOCSmol*ocs_convert_sub(ilon,ilev)
     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)
    3735    !convert ocs_convert from kg(OCS)/kgA to kg(S)/m2/layer/s for saving as diagnostic
    38     ocs_convert_sub(ilon,ilev)=ocs_convert_sub(ilon,ilev)*mSatom/mOCSmol* &
    39                             & (paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
     36    ocs_convert(ilon,ilev)=ocs_convert(ilon,ilev)*mSatom/mOCSmol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
    4037  ENDIF
    4138  ENDDO
    4239  ENDDO
    4340
    44 END SUBROUTINE OCS_TO_SO2
     41END SUBROUTINE ocs_to_so2
Note: See TracChangeset for help on using the changeset viewer.