source: LMDZ6/branches/Amaury_dev/libf/phylmd/Dust/bcscav_spl.f90 @ 5411

Last change on this file since 5411 was 5160, checked in by abarral, 5 months ago

Put .h into modules

File size: 1.9 KB
Line 
1SUBROUTINE bcscav_spl(pdtime, flxr, flxs, alpha_r, alpha_s, x, dx)
2
3  USE dimphy
4  USE lmdz_YOECUMF
5  USE lmdz_yomcst
6
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
11  IMPLICIT NONE
12  !=====================================================================
13  ! Objet : below-cloud scavenging of tracers
14  ! Date : september 1999
15  ! Auteur: O. Boucher (LOA)
16  !=====================================================================
17
18  REAL :: pdtime, alpha_r, alpha_s, R_r, R_s
19  PARAMETER (R_r = 0.001)          !--mean raindrop radius (m)
20  PARAMETER (R_s = 0.001)          !--mean snow crystal radius (m)
21  REAL :: flxr(klon, klev)         ! liquid precipitation rate (kg/m2/s)
22  REAL :: flxs(klon, klev)         ! solid  precipitation rate (kg/m2/s)
23  REAL :: flxr_aux(klon, klev + 1)
24  REAL :: flxs_aux(klon, klev + 1)
25  REAL :: x(klon, klev)              ! q de traceur
26  REAL :: dx(klon, klev)             ! tendance de traceur
27
28  !--variables locales
29  INTEGER :: i, k
30  REAL :: pr, ps, ice, water
31
32  !------------------------------------------
33
34  ! NHL
35  ! Auxiliary variables defined to deal with the fact that precipitation
36  ! fluxes are defined on klev levels only.
37  ! NHL
38
39  flxr_aux(:, klev + 1) = 0.0
40  flxs_aux(:, klev + 1) = 0.0
41  flxr_aux(:, 1:klev) = flxr(:, :)
42  flxs_aux(:, 1:klev) = flxs(:, :)
43
44  DO k = 1, klev
45    DO i = 1, klon
46      pr = 0.5 * (flxr_aux(i, k) + flxr_aux(i, k + 1))
47      ps = 0.5 * (flxs_aux(i, k) + flxs_aux(i, k + 1))
48      water = pr * alpha_r / R_r / rho_water
49      ice = ps * alpha_s / R_s / rho_ice
50      dx(i, k) = -3. / 4. * x(i, k) * pdtime * (water + ice)
51      !tmp       dx(i,k)=-3./4.*x(i,k)*pdtime*
52      !tmp     .         (pr*alpha_r/R_r/rho_water+ps*alpha_s/R_s/rho_ice)
53    ENDDO
54  ENDDO
55  !
56
57END SUBROUTINE bcscav_spl
Note: See TracBrowser for help on using the repository browser.