      SUBROUTINE gastoparticle(pdtphys,zdz,zrho,xlat,
     .                                                        tr_seri)
cnhl     .                         fluxso4chem, flux_sparam_sulf,

      USE dimphy
      USE infotrac
c      USE indice_sol_mod

      IMPLICIT NONE 
c
#include "dimensions.h"
#include "chem.h"
c #include "../phylmd/dimphy.h"
#include "../phylmd/YOMCST.h"
#include "../phylmd/YOECUMF.h"
c
      REAL pdtphys
      REAL zrho(klon,klev)
      REAL zdz(klon,klev)
      REAL tr_seri(klon,klev,nbtr)   ! traceurs
      REAL tend                 ! tendance par espece
      REAL xlat(klon)       ! latitudes pour chaque point
      REAL pi
c
c------------------------- Scaling Parameter --------------------------
c
c      REAL scale_param_so4(klon)  !Scaling parameter for sulfate

      INTEGER i, k
      REAL tau_chem     !---chemical lifetime in s
c
c------------------------- Variables to save --------------------------
c
cnhl      REAL fluxso4chem(klon,klev)
cnhl      REAL flux_sparam_sulf(klon,klev)

c======================================================================
      pi=atan(1.)*4.
c
      DO k = 1, klev
      DO i = 1, klon
c
c        tau_chem=scale_param_so4(i)*86400.*(8.-5.*cos(xlat(i)*pi/180.))    !tchemfctn2
cnhl        tau_chem=86400.*(8.-5.*cos(xlat(i)*pi/180.))    !tchemfctn2
        tau_chem=86400.*(5.-4.*cos(xlat(i)*pi/180.))    !
        tend=tr_seri(i,k,1)*(1.-exp(-pdtphys/tau_chem)) ! Sulfate production
cnhl        tend=(1.-exp(-pdtphys/tau_chem))
cnhl        tend=scale_param_so4(i) !as this it works
c      
        tr_seri(i,k,1) =tr_seri(i,k,1) - tend
        tr_seri(i,k,2) =tr_seri(i,k,2) + tend/RNAVO*masse_ammsulfate  !--gAER/KgAir
c
cnhl        fluxso4chem(i,k) = tend/RNAVO*masse_ammsulfate
cnhl        flux_sparam_sulf(i,k) = tend/RNAVO*masse_ammsulfate
      ENDDO
      ENDDO
c
      RETURN 
      END
