1 subroutine dsd(Q,Re,D,N,nsizes,dtype,rho_a,tc, &
2 dmin,dmax,apm,bpm,rho_c,p1,p2,p3,fc,scaled)
47 integer*4,
intent(in) :: nsizes
48 integer,
intent(in) :: dtype
49 real*8,
intent(in) ::
q,d(nsizes),rho_a,tc,dmin,dmax, &
54 real*8,
intent(inout) :: fc(nsizes),apm,bpm,re
55 logical,
intent(inout) :: scaled
59 real*8,
intent(out) ::
n(nsizes)
65 dmin_mm,dmax_mm,ahp,bhp, &
77 if ((rho_c > 0) .and. (apm < 0))
then
94 if (abs(p1+1) < 1e-8)
then
106 if (scaled .eqv. .
false.)
then
109 ((d*1e-6)**(vu-1)*exp(-1*d/d0)) / &
110 (apm*((d0*1e-6)**(vu+bpm))*
gamma(vu+bpm)) &
116 n = fc*rho_a*(
q*1e-3)
118 elseif (abs(p2+1) < 1e-8)
then
123 tmp1 = (
q*1e-3)**(1./bpm)
125 if (scaled .eqv. .
false.)
then
127 fc = (d*1e-6 / (
gamma(vu)/(apm*np*
gamma(vu+bpm)))** &
135 (rho_a*np*fc*(d*1e-6)**(-1.))/(
gamma(vu)*tmp1**vu) * &
136 exp(-1.*fc**(1./vu)/tmp1) &
142 print *,
'Error: Must specify a value for vu'
154 if (abs(p1+1) > 1e-8)
then
177 if (scaled .eqv. .
false.)
then
178 fc = ((apm*
gamma(1.+bpm)*n0)**tmp1)*(d*1e-6)
184 n0*exp(-1.*fc*(1./(rho_a*
q*1e-3))**tmp1) &
189 elseif (abs(p2+1) > 1e-8)
then
194 if (scaled .eqv. .
false.)
then
196 fc = (ld*1e6)**(1.+bpm)/(apm*
gamma(1+bpm))* &
197 exp(-1.*(ld*1e6)*(d*1e-6))*1e-12
202 n = fc*rho_a*(
q*1e-3)
207 ld = 1220*10.**(-0.0245*tc)*1e-6
208 n0 = ((ld*1e6)**(1+bpm)*
q*1e-3*rho_a)/(apm*
gamma(1+bpm))
227 if (abs(p1+2) < 1e-8)
then
231 bhp = -1.75+0.09*((tc+273)-243.16)
232 elseif ((tc >= -30) .and. (tc < -9))
then
233 bhp = -3.25-0.06*((tc+273)-265.66)
237 elseif (abs(p1+3) < 1e-8)
then
241 bhp = -1.75+0.09*((tc+273)-243.16)
242 elseif ((tc >= -35) .and. (tc < -17.5))
then
243 bhp = -2.65+0.09*((tc+273)-255.66)
244 elseif ((tc >= -17.5) .and. (tc < -9))
then
245 bhp = -3.25-0.06*((tc+273)-265.66)
266 tmp1 = rho_a*(
q*1e-3)*(bhp+bpm+1)
267 tmp2 = apm*(dmax_mm**bhp*dmax**(bpm+1)-dmin_mm**bhp*dmin**(bpm+1))
268 ahp = tmp1/tmp2 * 1e24
276 ahp*(d(
k)*1e-3)**bhp &
290 if (scaled .eqv. .
false.)
then
293 rho_e = (6/
pi)*apm*(d0*1e-6)**(bpm-3)
294 fc(1) = (6./(
pi*d0**3*rho_e))*1e12
299 n(1) = fc(1)*rho_a*(
q*1e-3)
310 if (abs(p1+1) < 1e-8)
then
314 tmp2 = (bpm*log_sigma_g)**2.
318 rg =re*exp(-2.5*(log_sigma_g**2))
321 if (scaled .eqv. .
false.)
then
324 (1./((2.*rg*1e-6)**(bpm)*apm*(2.*
pi)**(0.5) * &
325 log_sigma_g*d*0.5*1e-6)) * &
326 exp(-0.5*((log(0.5*d/rg)/log_sigma_g)**2.+tmp2)) &
332 n = fc*rho_a*(
q*1e-3)
334 elseif (abs(p2+1) < 1e-8)
then
340 tmp1 = (rho_a*(
q*1e-3))/(2.**bpm*apm*n0)
341 tmp2 = exp(0.5*bpm**2.*(log_sigma_g))**2.
342 rg = ((tmp1/tmp2)**(1/bpm))*1e6
345 n0 / ((2.*
pi)**(0.5)*log_sigma_g*d*0.5*1e-6) * &
346 exp((-0.5*(log(0.5*d/rg)/log_sigma_g)**2.)) &
352 print *,
'Error: Must specify a value for sigma_g'