CCPP SciDoc v7.0.0  v7.0.0
Common Community Physics Package Developed at DTC
 
Loading...
Searching...
No Matches
module_mp_tempo_aerosols.F90
2 !! contains produces used when aerosol-aware = true
3 use module_mp_tempo_params, only : wp, sp, dp, &
4 naccn0, naccn1, nain0, nain1, nwfa_default, aero_max
5
6 implicit none
7 private
8
9 public :: init_water_friendly_aerosols, init_ice_friendly_aerosols, &
10 aerosol_collection_efficiency
11
12 contains
13
14 subroutine init_water_friendly_aerosols(dz1d, nwfa)
15 !! sets water-friendly aerosols to an exponential profile
16 !! if aerosol-aware = true and no initial condition
17 !! is provided by the host model
18 real(wp), dimension(:), intent(in) :: dz1d
19 real(wp), dimension(:), intent(inout) :: nwfa
20 real(wp) :: hgt(size(dz1d))
21 real(wp) :: h_01, niccn3
22 integer :: k, nz
23
24 nz = size(dz1d)
25 hgt = 0._wp
26 do k = 2, nz
27 hgt(k) = hgt(k-1) + dz1d(k)
28 enddo
29
30 if(hgt(1) <= 1000.0_wp) then
31 h_01 = 0.8_wp
32 elseif(hgt(1) >= 2500.0_wp) then
33 h_01 = 0.01_wp
34 else
35 h_01 = 0.8_wp*cos(hgt(1)*0.001_wp - 1.0_wp)
36 endif
37 niccn3 = -1.0_wp*log(naccn1/naccn0)/h_01
38 nwfa(1) = naccn1+naccn0*exp(-((hgt(2)-hgt(1))/1000._wp)*niccn3)
39 do k = 2, nz
40 nwfa(k) = naccn1+naccn0*exp(-((hgt(k)-hgt(1))/1000._wp)*niccn3)
41 enddo
42 end subroutine init_water_friendly_aerosols
43
44
45 subroutine init_ice_friendly_aerosols(dz1d, nifa)
46 !! sets ice-friendly aerosols to an exponential profile
47 !! if aerosol-aware = true and no initial condition
48 !! is provided by the host model
49 real(wp), dimension(:), intent(in) :: dz1d
50 real(wp), dimension(:), intent(inout) :: nifa
51 real(wp), dimension(:), allocatable :: hgt
52 real(wp) :: h_01, niin3
53 integer :: k, nz
54
55 nz = size(dz1d)
56 allocate(hgt(nz), source=0._wp)
57 do k = 2, nz
58 hgt(k) = hgt(k-1) + dz1d(k)
59 enddo
60
61 if(hgt(1) <= 1000.0_wp) then
62 h_01 = 0.8_wp
63 elseif(hgt(1) >= 2500.0_wp) then
64 h_01 = 0.01_wp
65 else
66 h_01 = 0.8_wp*cos(hgt(1)*0.001_wp - 1.0_wp)
67 endif
68 niin3 = -1.0_wp*log(nain1/nain0)/h_01
69 nifa(1) = nain1+nain0*exp(-((hgt(2)-hgt(1))/1000._wp)*niin3)
70 do k = 2, nz
71 nifa(k) = nain1+nain0*exp(-((hgt(k)-hgt(1))/1000._wp)*niin3)
72 enddo
73 end subroutine init_ice_friendly_aerosols
74
75
76 function aerosol_collection_efficiency(d, da, visc, rhoa, temp, species) result(eff_a)
77 !! computes aerosol collection efficiency for precipitation scavenging
78 !! from [Wang et al. (2010)](https://doi.org/10.5194/acp-10-5685-2010)
79 use module_mp_tempo_params, only : rho_w, rho_s, av_s, bv_s, &
80 idx_bg1, pi, av_g, bv_g, rho_g
81
82 real(dp), intent(in) :: d
83 real(wp), intent(in) :: da, visc, rhoa, temp
84 character(len=1), intent(in) :: species
85 real(wp) :: aval, cc, diff, re, sc, st, st2, vt, eff, rho_p
86 real(wp), parameter :: boltzman = 1.3806503e-23_wp
87 real(wp), parameter :: meanpath = 0.0256e-6_wp
88 real(wp) :: eff_a
89
90 vt = 1._wp
91 rho_p = rho_w
92 ! rain
93 if (species == 'r') then
94 vt = -0.1021_wp + 4.932e3_wp*d - 0.9551e6_wp*d*d + &
95 0.07934e9_wp*d*d*d - 0.002362e12_wp*d*d*d*d
96 rho_p = rho_w
97 ! snow
98 elseif (species == 's') then
99 vt = av_s*d**bv_s
100 rho_p = rho_s
101 ! graupel
102 elseif (species .eq. 'g') then
103 vt = av_g(idx_bg1)*d**bv_g(idx_bg1)
104 rho_p = rho_g(idx_bg1)
105 endif
106 cc = 1._wp + 2._wp*meanpath/da *(1.257_wp+0.4_wp*exp(-0.55_wp*da/meanpath))
107 diff = boltzman*temp*cc/(3._wp*pi*visc*da)
108 re = 0.5_wp*rhoa*d*vt/visc
109 sc = visc/(rhoa*diff)
110 st = (rho_p-rhoa)*da*da*vt*cc/(9._wp*visc*d)
111 aval = log(1._wp + re)
112 st2 = (1.2_wp + 1._wp/12._wp*aval)/(1._wp+aval)
113 eff = 4._wp/(re*sc) * (1._wp + 0.4_wp*sqrt(re)*sc**0.3333_wp + &
114 0.16_wp*sqrt(re)*sqrt(sc)) + 4._wp*da/d * &
115 (0.02_wp + da/d*(1._wp+2._wp*sqrt(re)))
116 if (st > st2) eff = eff + ((st-st2)/(st-st2+0.666667_wp))**1.5_wp
117 eff_a = max(1.e-5_wp, min(eff, 1._wp))
118 end function aerosol_collection_efficiency
119