source: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/gastoparticle.f90 @ 5185

Last change on this file since 5185 was 5182, checked in by abarral, 3 months ago

(WIP) Replace REPROBUS CPP KEY by logical
properly name modules

File size: 2.8 KB
Line 
1SUBROUTINE gastoparticle(pdtphys, zdz, zrho, xlat, pplay, t_seri, &
2        id_prec, id_fine, tr_seri, his_g2pgas, his_g2paer)
3  USE dimphy
4  USE lmdz_infotrac
5  USE lmdz_YOECUMF
6  USE lmdz_yomcst
7  USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
8  USE lmdz_chem, ONLY: idms, iso2, iso4, ih2s, idmso, imsa, ih2o2, &
9          n_avogadro, masse_s, masse_so4, rho_water, rho_ice
10  USE lmdz_chem_spla, ONLY: masse_ammsulfate
11
12  IMPLICIT NONE
13
14  REAL :: pdtphys
15  REAL :: zrho(klon, klev)
16  REAL :: zdz(klon, klev)
17  REAL :: tr_seri(klon, klev, nbtr)   ! traceurs
18  REAL :: tend                 ! tendance par espece
19  REAL :: xlat(klon)       ! latitudes pour chaque point
20  REAL :: pi
21  !   JE: 20140120
22  REAL :: his_g2pgas(klon)
23  REAL :: his_g2paer(klon)
24  REAL :: tendincm3(klon, klev)
25  REAL :: tempvar(klon, klev)
26  REAL :: pplay(klon, klev)
27  REAL :: t_seri(klon, klev)
28  REAL :: tend2d(klon, klev)
29  INTEGER :: id_prec, id_fine
30
31  !------------------------- Scaling Parameter --------------------------
32
33  !  REAL scale_param_so4(klon)  !Scaling parameter for sulfate
34
35  INTEGER :: i, k
36  REAL :: tau_chem     !---chemical lifetime in s
37
38  !------------------------- Variables to save --------------------------
39
40  !nhl      REAL fluxso4chem(klon,klev)
41  !nhl      REAL flux_sparam_sulf(klon,klev)
42
43  !======================================================================
44  pi = atan(1.) * 4.
45
46  IF (id_prec>0 .AND. id_fine>0) THEN
47    DO k = 1, klev
48      DO i = 1, klon
49
50        !    tau_chem=scale_param_so4(i)*86400.*(8.-5.*cos(xlat(i)*pi/180.))    !tchemfctn2
51        !nhl        tau_chem=86400.*(8.-5.*cos(xlat(i)*pi/180.))    !tchemfctn2
52        tau_chem = 86400. * (5. - 4. * cos(xlat(i) * pi / 180.))    !
53        tend = tr_seri(i, k, id_prec) * (1. - exp(-pdtphys / tau_chem)) ! Sulfate production
54        !nhl        tend=(1.-exp(-pdtphys/tau_chem))
55        !nhl        tend=scale_param_so4(i) !as this it works
56
57        tr_seri(i, k, id_prec) = tr_seri(i, k, id_prec) - tend
58        tr_seri(i, k, id_fine) = tr_seri(i, k, id_fine) + &
59                tend / RNAVO * masse_ammsulfate  !--gAER/KgAir
60        tend2d(i, k) = tend
61
62        !nhl        fluxso4chem(i,k) = tend/RNAVO*masse_ammsulfate
63        !nhl        flux_sparam_sulf(i,k) = tend/RNAVO*masse_ammsulfate
64      ENDDO
65    ENDDO
66
67    tempvar = tend2d
68    CALL kg_to_cm3(pplay, t_seri, tempvar)
69    tendincm3 = tempvar
70
71    DO k = 1, klev
72      DO i = 1, klon
73
74        ! his_g2pgas(i) = his_g2pgas(i) + tendincm3(i,k)*1e6*zdz(i,k)/pdtphys
75        his_g2paer(i) = his_g2paer(i) + &
76                tendincm3(i, k) / RNAVO * masse_ammsulfate * 1.e3 * &
77                        1.e6 * zdz(i, k) / pdtphys    ! mg/m2/s
78        his_g2pgas(i) = his_g2paer(i) * masse_s / masse_ammsulfate ! mg-S/m2/s
79
80      ENDDO
81    ENDDO
82  ENDIF
83
84  !
85
86END SUBROUTINE gastoparticle
Note: See TracBrowser for help on using the repository browser.