source: LMDZ5/branches/LMDZ5_SPLA/libf/phylmd/gastoparticle.F @ 2175

Last change on this file since 2175 was 2175, checked in by jescribano, 10 years ago

SPLA code included for first time

File size: 2.6 KB
Line 
1      SUBROUTINE gastoparticle(pdtphys,zdz,zrho,xlat,pplay,t_seri,
2     .         id_prec,id_fine,
3     .         tr_seri,his_g2pgas ,his_g2paer )
4cnhl     .                         fluxso4chem, flux_sparam_sulf,
5
6      USE dimphy
7      USE infotrac
8c      USE indice_sol_mod
9
10      IMPLICIT NONE
11c
12#include "dimensions.h"
13#include "chem.h"
14c #include "../phylmd/dimphy.h"
15#include "../phylmd/YOMCST.h"
16#include "../phylmd/YOECUMF.h"
17c
18      REAL pdtphys
19      REAL zrho(klon,klev)
20      REAL zdz(klon,klev)
21      REAL tr_seri(klon,klev,nbtr)   ! traceurs
22      REAL tend                 ! tendance par espece
23      REAL xlat(klon)       ! latitudes pour chaque point
24      REAL pi
25c   JE: 20140120
26      REAL his_g2pgas(klon)
27      REAL his_g2paer(klon)
28      REAL tendincm3(klon,klev)
29      REAL tempvar(klon,klev)     
30      REAL pplay(klon,klev)
31      REAL t_seri(klon,klev)
32      REAL tend2d(klon,klev)
33      INTEGER id_prec,id_fine
34c
35c------------------------- Scaling Parameter --------------------------
36c
37c      REAL scale_param_so4(klon)  !Scaling parameter for sulfate
38
39      INTEGER i, k
40      REAL tau_chem     !---chemical lifetime in s
41c
42c------------------------- Variables to save --------------------------
43c
44cnhl      REAL fluxso4chem(klon,klev)
45cnhl      REAL flux_sparam_sulf(klon,klev)
46
47c======================================================================
48      pi=atan(1.)*4.
49c
50      DO k = 1, klev
51      DO i = 1, klon
52c
53c        tau_chem=scale_param_so4(i)*86400.*(8.-5.*cos(xlat(i)*pi/180.))    !tchemfctn2
54cnhl        tau_chem=86400.*(8.-5.*cos(xlat(i)*pi/180.))    !tchemfctn2
55        tau_chem=86400.*(5.-4.*cos(xlat(i)*pi/180.))    !
56        tend=tr_seri(i,k,id_prec)*(1.-exp(-pdtphys/tau_chem)) ! Sulfate production
57cnhl        tend=(1.-exp(-pdtphys/tau_chem))
58cnhl        tend=scale_param_so4(i) !as this it works
59c     
60        tr_seri(i,k,id_prec) =tr_seri(i,k,id_prec) - tend
61        tr_seri(i,k,id_fine) =tr_seri(i,k,id_fine) +
62     .                      tend/RNAVO*masse_ammsulfate  !--gAER/KgAir
63        tend2d(i,k)=tend
64c
65cnhl        fluxso4chem(i,k) = tend/RNAVO*masse_ammsulfate
66cnhl        flux_sparam_sulf(i,k) = tend/RNAVO*masse_ammsulfate
67      ENDDO
68      ENDDO
69   
70
71
72        tempvar=tend2d
73         CALL kg_to_cm3(pplay,t_seri,tempvar)
74        tendincm3=tempvar
75
76      DO k = 1, klev
77      DO i = 1, klon
78
79c        his_g2pgas(i) = his_g2pgas(i) + tendincm3(i,k)*1e6*zdz(i,k)/pdtphys
80        his_g2paer(i) = his_g2paer(i) +     
81     .    tendincm3(i,k)/RNAVO*masse_ammsulfate*1.e3*
82     .    1.e6*zdz(i,k)/pdtphys    ! mg/m2/s
83        his_g2pgas(i) = his_g2paer(i)*masse_s/masse_ammsulfate ! mg-S/m2/s
84
85      ENDDO
86      ENDDO
87
88
89c
90      RETURN
91      END
Note: See TracBrowser for help on using the repository browser.