1 !**********************************************************************************
2 ! This computer software was prepared by Battelle Memorial Institute, hereinafter
3 ! the Contractor, under Contract No. DE-AC05-76RL0 1830 with the Department of
4 ! Energy (DOE). NEITHER THE GOVERNMENT NOR THE CONTRACTOR MAKES ANY WARRANTY,
5 ! EXPRESS OR IMPLIED, OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE.
7 ! MOSAIC module: see module_mosaic_driver.F for references and terms of use
8 !**********************************************************************************
10 MODULE module_aer_drydep
18 !-----------------------------------------------------------------------
19 subroutine aer_drydep_driver( &
20 id, ktau, dtstep, config_flags, aer_mech_id, &
22 t_phy, rho_phy, p_phy, &
23 alt, p8w, t8w, dz8w, z, z_at_w, &
24 ust, aer_res, ivgtyp, vegfra, pbl, rmol, znt, &
26 h2oai, h2oaj, numgas, &
27 ids,ide, jds,jde, kds,kde, &
28 ims,ime, jms,jme, kms,kme, &
29 its,ite, jts,jte, kts,kte )
31 ! This routines allow different aerosol dry-deposition velocity parameterizations
32 ! to be used with various MOSAIC and SORGAM chem_opt packages.
34 ! This routine is called when config_flags%aer_drydep_opt >= 100.
35 ! However, values other than 101,111,201,301,302,311,312 cause an error.
37 ! For MOSAIC packages, calls are made to mosaic_aer_drydep_prep (to compute
38 ! wet/ambient size and density), then to one of the dry-deposition velocity
39 ! routines, then to mosaic_aer_drydep_load_ddvel.
40 ! For SORGAM packages, calls are made to sorgam_aer_drydep_prep (to compute
41 ! wet/ambient size and density), then to one of the dry-deposition velocity
42 ! routines, then to sorgam_aer_drydep_load_ddvel.
44 ! config_flags%aer_drydep_opt == 101 -- call sorgam_aer_drydepvel_2, which
45 ! uses the parameterization of subr vdvg_2 of module_aerosols_sorgam.F
47 ! config_flags%aer_drydep_opt == 111 -- call sorgam_aer_drydepvel_1, which
48 ! uses the parameterization of subr vdvg of module_aerosols_sorgam.F
50 ! config_flags%aer_drydep_opt == 201 -- call mosaic_aer_drydepvel_1, which
51 ! uses the parameterization of subr aerosol_depvel_2 of module_mosaic_drydep.F
53 ! config_flags%aer_drydep_opt == 301,302,311,312 -- call zhang2001_aer_drydepvel_1,
54 ! which uses the parameterization of zhang et al. (2001, atmos. environ., p. 549-560).
55 ! 301 & 302 - uses the parameterization as described in the 2001 paper
56 ! 311 & 312 - has some modifications that increase the interception term (thus
57 ! increasing depvel for particles in the accumulation size range)
58 ! and reduce the brownian diffusion and impaction terms (thus reducing
59 ! depvel for particles in the Aitken and coarse size ranges)
60 ! 301 & 311 - iseason is based on julian date, as in module_dep_simple.F
61 ! 302 & 312 - iseason is always 1 (summer)
64 use module_configure, only: grid_config_rec_type, num_moist, num_chem
65 use module_state_description, only: param_first_scalar
67 use module_data_mosaic_asect
68 use module_data_mosaic_other
70 use modal_aero_data, only: ntot_amode_cam_mam => ntot_amode
74 integer, intent(in) :: &
75 id, ktau, julday, aer_mech_id, &
78 integer, intent(in) :: &
79 ids, ide, jds, jde, kds, kde, &
80 ims, ime, jms, jme, kms, kme, &
81 its, ite, jts, jte, kts, kte
83 real, intent(in) :: dtstep, gmt
86 dimension( ims:ime, kms:kme, jms:jme ) :: &
87 t_phy, rho_phy, p_phy, &
88 alt, p8w, t8w, dz8w, z, z_at_w
90 integer, intent(in), &
91 dimension( ims:ime, jms:jme ) :: &
95 dimension( ims:ime, jms:jme ) :: &
96 ust, vegfra, pbl, rmol, znt
99 dimension( its:ite, jts:jte ) :: &
103 dimension( ims:ime, kms:kme, jms:jme, 1:num_moist ) :: &
106 real, intent(inout), &
107 dimension( ims:ime, kms:kme, jms:jme, 1:num_chem ) :: &
110 real, intent(inout), &
111 dimension( its:ite, jts:jte, 1:num_chem ) :: &
114 real, intent(inout), &
115 dimension( ims:ime, kms:kme, jms:jme ) :: &
118 type(grid_config_rec_type), intent(in) :: config_flags
122 integer :: i, ibin, iflag_coarse, iflag_nac, &
123 iok_aer_drydep_opt, ioptaa, iphase, iseason, isurftype, itype, iwetsurf
126 integer :: n, nbin_add, numaer
128 real :: airdensbox, airkinvisc
129 real :: depresist_a, depresist_d0, depresist_d3
130 real :: depresist_unstabpblfact
134 real :: tmpa, tmp_lnsg, tmp_num
136 real :: vsettl_0, vsettl_3
137 real :: wetdgnum, wetdens, wstar
138 real :: wetdgnum_si, wetdens_si
140 real, allocatable :: alnsg_add(:)
141 real, allocatable :: depvel0_add(:), depvel3_add(:)
142 real, allocatable :: wetdgnum_add(:), wetdens_add(:)
143 real, allocatable :: yextra_add(:,:)
145 character(len=160) :: txtaa
148 write(*,'(a,2(1x,i10))') &
149 '*** aer_drydep_driver - aer_mech_id, aer_drydep_opt = ', &
150 aer_mech_id, config_flags%aer_drydep_opt
152 ! allocate working arrays
153 if ((aer_mech_id == 1) .or. &
154 (aer_mech_id == 2)) then
157 else if (aer_mech_id == 3) then
158 nbin_add = sum( nsize_aer(1:ntype_aer) )
159 else if (aer_mech_id == 4) then
160 nbin_add = ntot_amode_cam_mam
162 write(txtaa,'(a,2(1x,i10))') &
163 '*** aer_drydep_driver - bad aer_mech_id, aer_drydep_opt = ', &
164 aer_mech_id, config_flags%aer_drydep_opt
165 write(*,'(a)') trim(txtaa)
166 call wrf_error_fatal( txtaa )
169 allocate( alnsg_add( nbin_add ) )
170 allocate( depvel0_add( nbin_add ) )
171 allocate( depvel3_add( nbin_add ) )
172 allocate( wetdgnum_add( nbin_add ) )
173 allocate( wetdens_add( nbin_add ) )
174 allocate( yextra_add( nbin_add, 10 ) )
183 ! get aerosol properties at lowest model layer
184 if ((aer_mech_id == 1) .or. &
185 (aer_mech_id == 2)) then
186 call sorgam_aer_drydep_prep( &
187 id, ktau, dtstep, config_flags, aer_mech_id, &
189 t_phy, rho_phy, p_phy, alt, p8w, t8w, &
192 nbin_add, alnsg_add, wetdgnum_add, wetdens_add, &
195 ids,ide, jds,jde, kds,kde, &
196 ims,ime, jms,jme, kms,kme, &
197 its,ite, jts,jte, kts,kte )
199 else if (aer_mech_id == 3) then
200 call mosaic_aer_drydep_prep( &
201 id, ktau, dtstep, config_flags, aer_mech_id, &
203 t_phy, rho_phy, p_phy, alt, p8w, t8w, &
205 nbin_add, alnsg_add, wetdgnum_add, wetdens_add, &
208 ids,ide, jds,jde, kds,kde, &
209 ims,ime, jms,jme, kms,kme, &
210 its,ite, jts,jte, kts,kte )
211 else if (aer_mech_id == 4) then
212 call cam_mam_aer_drydep_prep( &
213 id, ktau, dtstep, config_flags, aer_mech_id, &
215 t_phy, rho_phy, p_phy, alt, p8w, t8w, &
217 nbin_add, alnsg_add, wetdgnum_add, wetdens_add, &
220 ids,ide, jds,jde, kds,kde, &
221 ims,ime, jms,jme, kms,kme, &
222 its,ite, jts,jte, kts,kte )
225 txtaa = '*** aer_drydep_driver - fatal error 200'
226 call wrf_error_fatal( txtaa )
230 ! calculate deposition velocities
231 do ibin = 1, nbin_add
234 depresist_a = aer_res(i,j)
235 tempbox = t_phy(i,kts,j)
236 presbox = p_phy(i,kts,j)
238 wetdgnum = wetdgnum_add(ibin)
239 wetdens = wetdens_add(ibin)
240 tmp_lnsg = alnsg_add(ibin)
242 iok_aer_drydep_opt = 0
244 if ((config_flags%aer_drydep_opt >= 100) .and. &
245 (config_flags%aer_drydep_opt <= 199)) then
248 ustar = max( 1.e-1, ust(i,j) ) ! this done in sorgam_depdriver
249 tmpa = .001*p_phy(i,kts,j)
252 airdensbox = 1.0/alt(i,kts,j)
255 if (aer_mech_id <= 2) then
256 if (ibin == 3) iflag_coarse = 1
258 ! yextra_add(ibin,9) = "reference" diameter (m)
259 if (yextra_add(ibin,9) >= 1.0e-6) iflag_coarse = 1
262 if (config_flags%aer_drydep_opt == 101) then
263 iok_aer_drydep_opt = 1
265 call sorgam_aer_drydepvel_2( &
267 wetdgnum, tmp_lnsg, wetdens, &
268 tempbox, presbox, airdensbox, &
269 ustar, depresist_a, &
270 pbl(i,j), znt(i,j), rmol(i,j), &
271 airkinvisc, freepath, &
272 depvel0_add(ibin), depvel3_add(ibin), &
273 depresist_d0, depresist_d3, &
276 else if (config_flags%aer_drydep_opt == 111) then
277 iok_aer_drydep_opt = 1
280 call sorgam_aer_drydepvel_1( &
282 wetdgnum, tmp_lnsg, wetdens, &
283 tempbox, presbox, airdensbox, &
284 ustar, wstar, depresist_a, &
285 airkinvisc, freepath, &
286 depvel0_add(ibin), depvel3_add(ibin), &
287 depresist_d0, depresist_d3, &
292 depresist_unstabpblfact = 0.0
296 else if ((config_flags%aer_drydep_opt >= 200) .and. &
297 (config_flags%aer_drydep_opt <= 299)) then
300 depresist_unstabpblfact = 0.0
302 if ((config_flags%aer_drydep_opt == 201) .or. &
303 (config_flags%aer_drydep_opt == 211)) then
304 iok_aer_drydep_opt = 1
305 airdensbox = rho_phy(i,kts,j)
307 if (config_flags%aer_drydep_opt == 211) ioptaa = 2
309 call mosaic_aer_drydepvel_1( &
310 ioptaa, wetdgnum, tmp_lnsg, wetdens, &
311 tempbox, airdensbox, ustar, depresist_a, &
312 airkinvisc, freepath, depresist_unstabpblfact, &
313 depvel0_add(ibin), depvel3_add(ibin), &
314 depresist_d0, depresist_d3, &
319 else if ((config_flags%aer_drydep_opt >= 300) .and. &
320 (config_flags%aer_drydep_opt <= 399)) then
323 depresist_unstabpblfact = 0.0
325 if ((config_flags%aer_drydep_opt == 301) .or. &
326 (config_flags%aer_drydep_opt == 302) .or. &
327 (config_flags%aer_drydep_opt == 311) .or. &
328 (config_flags%aer_drydep_opt == 312)) then
329 iok_aer_drydep_opt = 1
330 airdensbox = rho_phy(i,kts,j)
331 isurftype = ivgtyp(i,j)
332 ! should set iwetsurf=1 when rainfall>0 or relhum>~95%
334 ! this is how iseason is set in module_dep_simple
335 ! could do a better job using leaf area index
337 if (julday < 90 .or. julday > 270) iseason = 2
338 if ((config_flags%aer_drydep_opt == 302) .or. &
339 (config_flags%aer_drydep_opt == 312)) iseason = 1
341 if ((config_flags%aer_drydep_opt == 311) .or. &
342 (config_flags%aer_drydep_opt == 312)) ioptaa = 2
344 call zhang2001_aer_drydepvel_1( &
345 wetdgnum, tmp_lnsg, wetdens, &
346 tempbox, airdensbox, ustar, depresist_a, &
347 ioptaa, iseason, isurftype, 2, iwetsurf, &
348 airkinvisc, freepath, &
350 depvel0_add(ibin), depvel3_add(ibin), &
351 depresist_d0, depresist_d3, &
358 if (iok_aer_drydep_opt <= 0) then
359 write(txtaa,'(a,2(1x,i10))') &
360 '*** aer_drydep_driver - bad aer_mech_id, aer_drydep_opt = ', &
361 aer_mech_id, config_flags%aer_drydep_opt
362 write(*,'(a)') trim(txtaa)
363 call wrf_error_fatal( txtaa )
370 ! load deposition velocities into ddvel array
371 if ((aer_mech_id == 1) .or. &
372 (aer_mech_id == 2)) then
373 call sorgam_aer_drydep_load_ddvel( &
374 id, ktau, dtstep, config_flags, aer_mech_id, &
376 nbin_add, depvel0_add, depvel3_add, &
378 ids,ide, jds,jde, kds,kde, &
379 ims,ime, jms,jme, kms,kme, &
380 its,ite, jts,jte, kts,kte )
382 else if (aer_mech_id == 3) then
383 call mosaic_aer_drydep_load_ddvel( &
384 id, ktau, dtstep, config_flags, aer_mech_id, &
386 nbin_add, depvel0_add, depvel3_add, &
388 ids,ide, jds,jde, kds,kde, &
389 ims,ime, jms,jme, kms,kme, &
390 its,ite, jts,jte, kts,kte )
391 else if (aer_mech_id == 4) then
392 call cam_mam_aer_drydep_load_ddvel( &
393 id, ktau, dtstep, config_flags, aer_mech_id, &
395 nbin_add, depvel0_add, depvel3_add, &
397 ids,ide, jds,jde, kds,kde, &
398 ims,ime, jms,jme, kms,kme, &
399 its,ite, jts,jte, kts,kte )
402 txtaa = '*** aer_drydep_driver - fatal error 400'
403 call wrf_error_fatal( txtaa )
411 ! deallocate working arrays
412 deallocate( alnsg_add )
413 deallocate( depvel0_add )
414 deallocate( depvel3_add )
415 deallocate( wetdgnum_add )
416 deallocate( wetdens_add )
417 deallocate( yextra_add )
422 end subroutine aer_drydep_driver
426 !-----------------------------------------------------------------------
427 subroutine mosaic_aer_drydep_prep( &
428 id, ktau, dtstep, config_flags, aer_mech_id, &
430 t_phy, rho_phy, p_phy, alt, p8w, t8w, &
432 nbin_add, alnsg_add, wetdgnum_add, wetdens_add, &
435 ids,ide, jds,jde, kds,kde, &
436 ims,ime, jms,jme, kms,kme, &
437 its,ite, jts,jte, kts,kte )
439 use module_configure, only: num_moist, num_chem, &
441 use module_state_description, only: param_first_scalar
443 use module_data_mosaic_asect
444 use module_data_mosaic_other, only: lunerr, lunout, pi
449 integer, intent(in) :: &
450 id, ktau, julday, aer_mech_id, nbin_add, &
453 integer, intent(in) :: &
454 ids, ide, jds, jde, kds, kde, &
455 ims, ime, jms, jme, kms, kme, &
456 its, ite, jts, jte, kts, kte
458 real, intent(in) :: dtstep, gmt
461 dimension( ims:ime, kms:kme, jms:jme ) :: &
462 t_phy, rho_phy, p_phy, alt, p8w, t8w
465 dimension( ims:ime, kms:kme, jms:jme, 1:num_moist ) :: &
469 dimension( ims:ime, kms:kme, jms:jme, 1:num_chem ) :: &
472 real, intent(inout), &
473 dimension( 1:nbin_add ) :: &
474 alnsg_add, wetdgnum_add, wetdens_add
476 real, intent(inout), &
477 dimension( 1:nbin_add, 10 ) :: &
480 type(grid_config_rec_type), intent(in) :: config_flags
484 integer :: ibin, ijcount, iok, iphase, itype
487 integer :: l, ll, l1, n
490 real, parameter :: densdefault = 2.0
491 real, parameter :: smallmassaa = 1.0e-20
492 real, parameter :: smallmassbb = 1.0e-30
493 real, parameter :: piover6 = pi/6.0
494 real, parameter :: onethird = 1.0/3.0
496 real :: drydens, drydp, drymass, dryvol
498 real :: tmpa, tmp_lnsg
499 real :: wetdgnum, wetdens, wetdp, wetmass, wetvol
500 real :: wetdgnum_si, wetdens_si
502 character(len=160) :: txtaa
505 n = sum( nsize_aer(1:ntype_aer) )
506 if (n /= nbin_add) then
507 write(txtaa,'(a,2(1x,i10))') &
508 '*** mosaic_aer_drydep_prep - bad nbin_add, sum(nsize)', &
510 write(*,'(a)') trim(txtaa)
511 call wrf_error_fatal( txtaa )
516 ! set some variables to their wrf-chem "standard" values
517 p1st = param_first_scalar
525 ijcount = ijcount + 1
527 ! *** for now, just calc vdep_aer for iphase = ai_phase
530 ! calculate vdep_aer for each type and size
532 do 2900 itype = 1, ntype_aer
533 do 2800 n = 1, nsize_aer(itype)
536 ! calculate dry and wet mass, volume, density, and mass-mean diameters
539 do ll = 1, ncomp_aer(itype)
540 l1 = massptr_aer(ll,n,itype,iphase)
541 tmpa = max( chem(i,k,j,l1), 0.0 )
542 drymass = drymass + tmpa
543 dryvol = dryvol + tmpa/dens_aer(ll,itype)
546 l1 = waterptr_aer(n,itype)
547 tmpa = max( chem(i,k,j,l1), 0.0 )
548 wetmass = drymass + tmpa
549 wetvol = dryvol + tmpa/dens_water_aer
551 l1 = numptr_aer(n,itype,iphase)
552 rnum = max( chem(i,k,j,l1), 0.0 )
554 drymass = drymass*28.966e-9 ! ug/kg-air --> g/mol-air
555 wetmass = wetmass*28.966e-9
556 dryvol = dryvol *28.966e-9 ! "u-cm3"/kg-air --> cm3/mol-air
557 wetvol = wetvol *28.966e-9
558 rnum = rnum*28.966e-3 ! #/kg-air --> #/mol-air
560 if (drymass <= smallmassbb) then
561 drydp = dcen_sect(n,itype)
562 drydens = densdefault
567 if (drymass <= smallmassaa) then
571 drydens = drymass/dryvol
572 wetdens = wetmass/wetvol
574 if (rnum >= dryvol/volumlo_sect(n,itype)) then
575 drydp = dlo_sect(n,itype)
576 else if (rnum <= dryvol/volumhi_sect(n,itype)) then
577 drydp = dhi_sect(n,itype)
579 drydp = (dryvol/(piover6*rnum))**onethird
582 if (abs(wetvol) > (1000.*abs(dryvol))) then
585 tmpa=abs(wetvol/dryvol)**onethird
586 tmpa=max(1.0,min(tmpa,10.0))
593 ! "within section" size distribution currently assumed to be
594 ! monodisperse, but could assume otherwise
595 tmp_lnsg = log( 1.0 )
596 wetdgnum = wetdp * exp( -1.5*tmp_lnsg*tmp_lnsg )
598 wetdgnum_add(ibin) = wetdgnum * 1.0e-2 ! cm --> m
599 wetdens_add(ibin) = wetdens * 1.0e3 ! g/cm3 --> kg/m3
600 alnsg_add(ibin) = tmp_lnsg
603 yextra_add(ibin,1) = drymass/28.966e-9 ! g/mol-air --> ug/kg-air = "n-kg"/kg-air
604 yextra_add(ibin,5) = wetmass/28.966e-9
605 yextra_add(ibin,2) = dryvol/28.966e-6 ! cm3/mol-air --> "n-m3"/kg-air
606 yextra_add(ibin,6) = wetvol/28.966e-6
607 yextra_add(ibin,3) = drydens*1.0e3 ! g/cm3 --> kg/m3
608 yextra_add(ibin,7) = wetdens*1.0e3
609 yextra_add(ibin,4) = drydp*1.0e-2 ! cm --> m
610 yextra_add(ibin,8) = wetdp*1.0e-2
612 yextra_add(ibin,9) = dcen_sect(n,itype)*1.0e-2 ! cm --> m
613 yextra_add(ibin,10) = rnum/28.966e-3 ! #/mol-air --> #/kg-air
621 end subroutine mosaic_aer_drydep_prep
625 !-----------------------------------------------------------------------
626 subroutine mosaic_aer_drydep_load_ddvel( &
627 id, ktau, dtstep, config_flags, aer_mech_id, &
629 nbin_add, depvel0_add, depvel3_add, &
631 ids,ide, jds,jde, kds,kde, &
632 ims,ime, jms,jme, kms,kme, &
633 its,ite, jts,jte, kts,kte )
635 use module_configure, only: num_moist, num_chem, &
637 use module_state_description, only: param_first_scalar
639 use module_data_mosaic_asect
644 integer, intent(in) :: &
645 id, ktau, aer_mech_id, nbin_add, &
648 integer, intent(in) :: &
649 ids, ide, jds, jde, kds, kde, &
650 ims, ime, jms, jme, kms, kme, &
651 its, ite, jts, jte, kts, kte
653 real, intent(in) :: dtstep
656 dimension( 1:nbin_add ) :: &
657 depvel0_add, depvel3_add
660 dimension( its:ite, jts:jte, 1:num_chem ) :: &
663 type(grid_config_rec_type), intent(in) :: config_flags
667 integer :: ibin, iphase, itype
670 character(len=160) :: txtaa
673 n = sum( nsize_aer(1:ntype_aer) )
674 if (n /= nbin_add) then
675 write(txtaa,'(a,2(1x,i10))') &
676 '*** mosaic_aer_drydep_load_ddvel - bad nbin_add, sum(nsize)', &
678 write(*,'(a)') trim(txtaa)
679 call wrf_error_fatal( txtaa )
684 ! copy from vdep_aer array to ddvel array
685 do iphase = 1, nphase_aer
687 do itype = 1, ntype_aer
688 do n = 1, nsize_aer(itype)
690 do ll = -2, ncomp_plustracer_aer(itype)
692 l = numptr_aer(n,itype,iphase)
693 else if (ll == -1) then
695 if (iphase .eq. ai_phase) l = waterptr_aer(n,itype)
696 else if (ll == 0) then
698 if (iphase == ai_phase) l = hyswptr_aer(n,itype)
700 l = massptr_aer(ll,n,itype,iphase)
702 if (iphase > 1) l = -1
704 if ((l >= param_first_scalar) .and. (l <= num_chem)) then
705 ddvel(i,j,l) = depvel3_add(ibin)
714 end subroutine mosaic_aer_drydep_load_ddvel
718 !------------------------------------------------------------------------
719 subroutine mosaic_aer_drydepvel_1( &
720 ioptaa, dgnum, alnsg, aerodens, &
721 temp, airdens, ustar, depresist_a, &
722 airkinvisc, freepath, depresist_unstabpblfact, &
723 depvel_0, depvel_3, &
724 depresist_d0, depresist_d3, &
727 ! computes the surface layer resistance term and the
728 ! gravitational settling velocity term for the 3rd moment
729 ! of a log-normal aerosol mode
732 ! ioptaa = 2 - apply a sticking fraction for larger particles
733 ! = other - sticking fraction = 1 always
734 ! dgnum - geometric mean diameter for aerosol number (m)
735 ! alnsg - natural logarithm of the geometric standard deviation
737 ! aerodens - aerosol density (dgnum and aerodens are for the
738 ! actual wet distribution)
739 ! temp - temperature (K)
740 ! airdens - air density (kg/m^3)
741 ! airkinvisc - air kinematic viscosity (m^2/s)
742 ! freepath - air molecular freepath (m)
743 ! ustar - friction velocity (m/s)
744 ! depresist_a = aerodynamic resistance (s/m)
745 ! depresist_unstabpblfact = weseley et al. 1985 factor for increasing
746 ! depvel in unstable pbl -- either
747 ! 1. + (-0.3*zi/L)**0.667 OR
748 ! 1. + 0.24*((wstar/ustar)**2)
750 ! depvel_0 - deposition velocity for 0th (number) moment (m/s)
751 ! depvel_3 - deposition velocity for 3rd (mass ) moment (m/s)
752 ! depresist_d0/_d3 - surface layer resistance for 0th/3rd moment (s/m)
753 ! vsettl_0/_3 - gravitational settling velocity for 0th/3rd moment (m/s)
758 integer, intent(in) :: &
760 real, intent(in) :: &
761 dgnum, alnsg, aerodens, &
762 temp, airdens, ustar, depresist_a
763 real, intent(inout) :: &
764 airkinvisc, freepath, depresist_unstabpblfact
765 real, intent(out) :: &
766 depvel_0, depvel_3, &
767 depresist_d0, depresist_d3, &
770 real :: aerodiffus_0, schmidt_0, stokes_0, facdepresist_d0
771 real :: aerodiffus_3, schmidt_3, stokes_3, facdepresist_d3
772 common / aerosol_depvel_cmn01 / &
773 aerodiffus_0, schmidt_0, stokes_0, facdepresist_d0, &
774 aerodiffus_3, schmidt_3, stokes_3, facdepresist_d3
776 real :: aerodiffus_dgnum, alnsg2, &
778 tmpa, tmpb, tmp_dvm, &
779 vsettl_dgnum, xknudsen, xknudsenfact
781 real, parameter :: pi = 3.1415926536
782 ! gravity = gravitational acceleration in m/s^2
783 real, parameter :: gravity = 9.80616
784 ! boltzmann constant in erg/deg-K
785 real, parameter :: boltzmann = 1.3807e-23
788 if (airkinvisc <= 0.0) then
789 ! air kinematic viscosity (m^2/s)
790 airkinvisc = ( 1.8325e-5 * (416.16/(temp+120.0)) * &
791 ((temp/296.16)**1.5) ) / airdens
793 if (freepath <= 0.0) then
794 ! air molecular freepath (m)
795 freepath = 7.39758e-2 * airkinvisc / sqrt(temp)
797 if (depresist_unstabpblfact <= 0) then
798 ! enhancement factor for unstable pbl
799 depresist_unstabpblfact = 1.0
802 xknudsen = 2.*freepath/dgnum
803 xknudsenfact = xknudsen*1.246
806 vsettl_dgnum = (gravity*aerodens*dgnum*dgnum)/ &
807 (18.*airkinvisc*airdens)
808 vsettl_0 = vsettl_dgnum * &
809 ( exp(2.*alnsg2) + xknudsenfact*exp(0.5*alnsg2) )
810 vsettl_3 = vsettl_dgnum * &
811 ( exp(8.*alnsg2) + xknudsenfact*exp(3.5*alnsg2) )
813 aerodiffus_dgnum = (boltzmann*temp)/ &
814 (3.*pi*airkinvisc*airdens*dgnum)
815 aerodiffus_0 = aerodiffus_dgnum * &
816 ( exp(+0.5*alnsg2) + xknudsenfact*exp(+2.*alnsg2) )
817 aerodiffus_3 = aerodiffus_dgnum * &
818 ( exp(-2.5*alnsg2) + xknudsenfact*exp(-4.*alnsg2) )
820 schmidt_0 = airkinvisc/aerodiffus_0
821 schmidt_3 = airkinvisc/aerodiffus_3
823 stokes_0 = ustar*ustar*vsettl_0/(gravity*airkinvisc)
824 stokes_3 = ustar*ustar*vsettl_3/(gravity*airkinvisc)
826 tmp_dvm = dgnum * exp(1.5*alnsg2) ! volume mean diameter
828 tmpa = (schmidt_0**(-0.66666666)) + &
829 (10.**(-3./max(0.03,stokes_0)))
830 ! tmpb = tmpa*ustar*(1. + 0.24*wstaroverustar*wstaroverustar)
831 tmpb = tmpa*ustar*depresist_unstabpblfact
832 if (ioptaa == 2) then
833 if (tmp_dvm >= 5.0e-6) then
834 stickfrac = exp( -2.0*sqrt(max(0.0,stokes_0)) )
835 tmpb = tmpb*stickfrac
838 depresist_d0 = 1./max( tmpb, 1.e-22 )
839 facdepresist_d0 = tmpa
841 tmpa = (schmidt_3**(-0.66666666)) + &
842 (10.**(-3./max(0.03,stokes_3)))
843 ! tmpb = tmpa*ustar*(1. + 0.24*wstaroverustar*wstaroverustar)
844 tmpb = tmpa*ustar*depresist_unstabpblfact
845 if (ioptaa == 2) then
846 if (tmp_dvm >= 5.0e-6) then
847 stickfrac = exp( -2.0*sqrt(max(0.0,stokes_3)) )
848 tmpb = tmpb*stickfrac
851 depresist_d3 = 1./max( tmpb, 1.e-22 )
852 facdepresist_d3 = tmpa
854 ! compute overall deposition velocity (binkowski/shankar eqn a33)
855 tmpa = depresist_a + depresist_d3 + &
856 depresist_a*depresist_d3*vsettl_3
857 depvel_3 = vsettl_3 + (1./tmpa)
859 tmpa = depresist_a + depresist_d0 + &
860 depresist_a*depresist_d0*vsettl_0
861 depvel_0 = vsettl_0 + (1./tmpa)
864 end subroutine mosaic_aer_drydepvel_1
868 !-----------------------------------------------------------------------
869 subroutine sorgam_aer_drydep_prep( &
870 id, ktau, dtstep, config_flags, aer_mech_id, &
872 t_phy, rho_phy, p_phy, alt, p8w, t8w, &
875 nbin_add, alnsg_add, wetdgnum_add, wetdens_add, &
878 ids,ide, jds,jde, kds,kde, &
879 ims,ime, jms,jme, kms,kme, &
880 its,ite, jts,jte, kts,kte )
882 use module_configure, only: num_moist, num_chem, &
884 use module_state_description
886 use module_data_sorgam
887 use module_aerosols_sorgam, only: modpar
892 integer, intent(in) :: &
893 id, ktau, julday, aer_mech_id, &
896 integer, intent(in) :: &
897 ids, ide, jds, jde, kds, kde, &
898 ims, ime, jms, jme, kms, kme, &
899 its, ite, jts, jte, kts, kte
901 real, intent(in) :: dtstep, gmt
904 dimension( ims:ime, kms:kme, jms:jme ) :: &
905 t_phy, rho_phy, p_phy, alt, p8w, t8w
908 dimension( ims:ime, kms:kme, jms:jme, 1:num_moist ) :: &
912 dimension( ims:ime, kms:kme, jms:jme, 1:num_chem ) :: &
916 dimension( ims:ime, kms:kme, jms:jme ) :: &
919 real, intent(inout), &
920 dimension( 1:nbin_add ) :: &
921 alnsg_add, wetdgnum_add, wetdens_add
923 real, intent(inout), &
924 dimension( 1:nbin_add, 10 ) :: &
927 type(grid_config_rec_type), intent(in) :: config_flags
931 ! local variables and parameters
934 !...blksize set to one in column model ciarev02
935 integer, parameter :: blksize=1
937 !...number of aerosol species
938 ! number of species (gas + aerosol)
939 integer, parameter :: nspcsda=l1ae !bs
941 integer, parameter :: numcells=1
942 ! actual number of cells in arrays ( default is 1 in box model)
943 ! kept to 1 in current version of column model
945 !bs total # of cond. vapors in ctm
946 real cblk(blksize,nspcsda) ! main array of variables
947 ! particles [ug/m^3/s]
949 real blkprs(blksize) ! pressure in cb
950 real blkta(blksize) ! temperature in k
951 real blkdens(blksize) ! air density in kg/m3
954 ! *** atmospheric properties
955 real xlm( blksize ) ! atmospheric mean free path [ m ]
956 real amu( blksize ) ! atmospheric dynamic viscosity [ kg/m s ]
958 ! *** followng is for future version
959 real vsed( blksize, naspcssed) ! sedimentation velocity [ m s**-1 ]
960 real vdep( blksize, naspcsdep) ! deposition velocity [ m s**-1 ]
962 ! *** modal diameters: [ m ]
963 real dgnuc( blksize ) ! nuclei mode geometric mean diameter [ m ]
964 real dgacc( blksize ) ! accumulation geometric mean diameter [ m ]
965 real dgcor( blksize ) ! coarse mode geometric mean diameter [ m ]
967 ! *** aerosol properties:
968 ! *** modal mass concentrations [ ug m**3 ]
969 real pmassn( blksize ) ! mass concentration in aitken mode
970 real pmassa( blksize ) ! mass concentration in accumulation mode
971 real pmassc( blksize ) ! mass concentration in coarse mode
973 ! *** average modal particle densities [ kg/m**3 ]
974 real pdensn( blksize ) ! average particle density in nuclei mode
975 real pdensa( blksize ) ! average particle density in accumulation mode
976 real pdensc( blksize ) ! average particle density in coarse mode
978 ! *** average modal knudsen numbers
979 real knnuc ( blksize ) ! nuclei mode knudsen number
980 real knacc ( blksize ) ! accumulation knudsen number
981 real kncor ( blksize ) ! coarse mode knudsen number
986 real, dimension( ims:ime, jms:jme ) :: aer_res, ust ! TEMPORARY
987 real, dimension( kts:kte ) :: p ! TEMPORARY
989 character(len=160) :: txtaa
992 if (3 /= nbin_add) then
993 write(txtaa,'(a,2(1x,i10))') &
994 '*** sorgam_aer_drydep_prep - bad nbin_add', &
996 write(*,'(a)') trim(txtaa)
997 call wrf_error_fatal( txtaa )
1002 ! print *,'in sorgdepdriver ',its,ite,jts,jte
1009 ! p(k) = .001*p_phy(ii,k,jj)
1016 p(k) = .001*p_phy(i,k,j)
1017 convfac2 = 1./alt(i,k,j)
1018 blkdens(blksize) = convfac2
1019 blkta(blksize) = t_phy(i,k,j)
1020 blkprs(blksize) = 1.e3*p(k)
1023 cblk(1,vso4aj ) = max( epsilc, chem(i,k,j,p_so4aj)*convfac2 )
1024 cblk(1,vso4ai ) = max( epsilc, chem(i,k,j,p_so4ai)*convfac2 )
1025 cblk(1,vnh4aj ) = max( epsilc, chem(i,k,j,p_nh4aj)*convfac2 )
1026 cblk(1,vnh4ai ) = max( epsilc, chem(i,k,j,p_nh4ai)*convfac2 )
1027 cblk(1,vno3aj ) = max( epsilc, chem(i,k,j,p_no3aj)*convfac2 )
1028 cblk(1,vno3ai ) = max( epsilc, chem(i,k,j,p_no3ai)*convfac2 )
1029 if (p_naaj >= param_first_scalar) &
1030 cblk(1,vnaaj ) = max( epsilc, chem(i,k,j,p_naaj)*convfac2 )
1031 if (p_naai >= param_first_scalar) &
1032 cblk(1,vnaai ) = max( epsilc, chem(i,k,j,p_naai)*convfac2 )
1033 if (p_claj >= param_first_scalar) &
1034 cblk(1,vclaj ) = max( epsilc, chem(i,k,j,p_claj)*convfac2 )
1035 if (p_clai >= param_first_scalar) &
1036 cblk(1,vclai ) = max( epsilc, chem(i,k,j,p_clai)*convfac2 )
1037 cblk(1,vorgaro1j) = max( epsilc, chem(i,k,j,p_orgaro1j)*convfac2 )
1038 cblk(1,vorgaro1i) = max( epsilc, chem(i,k,j,p_orgaro1i)*convfac2 )
1039 cblk(1,vorgaro2j) = max( epsilc, chem(i,k,j,p_orgaro2j)*convfac2 )
1040 cblk(1,vorgaro2i) = max( epsilc, chem(i,k,j,p_orgaro2i)*convfac2 )
1041 cblk(1,vorgalk1j) = max( epsilc, chem(i,k,j,p_orgalk1j)*convfac2 )
1042 cblk(1,vorgalk1i) = max( epsilc, chem(i,k,j,p_orgalk1i)*convfac2 )
1043 cblk(1,vorgole1j) = max( epsilc, chem(i,k,j,p_orgole1j)*convfac2 )
1044 cblk(1,vorgole1i) = max( epsilc, chem(i,k,j,p_orgole1i)*convfac2 )
1045 cblk(1,vorgba1j ) = max( epsilc, chem(i,k,j,p_orgba1j)*convfac2 )
1046 cblk(1,vorgba1i ) = max( epsilc, chem(i,k,j,p_orgba1i)*convfac2 )
1047 cblk(1,vorgba2j ) = max( epsilc, chem(i,k,j,p_orgba2j)*convfac2 )
1048 cblk(1,vorgba2i ) = max( epsilc, chem(i,k,j,p_orgba2i)*convfac2 )
1049 cblk(1,vorgba3j ) = max( epsilc, chem(i,k,j,p_orgba3j)*convfac2 )
1050 cblk(1,vorgba3i ) = max( epsilc, chem(i,k,j,p_orgba3i)*convfac2 )
1051 cblk(1,vorgba4j ) = max( epsilc, chem(i,k,j,p_orgba4j)*convfac2 )
1052 cblk(1,vorgba4i ) = max( epsilc, chem(i,k,j,p_orgba4i)*convfac2 )
1053 cblk(1,vorgpaj ) = max( epsilc, chem(i,k,j,p_orgpaj)*convfac2 )
1054 cblk(1,vorgpai ) = max( epsilc, chem(i,k,j,p_orgpai)*convfac2 )
1055 cblk(1,vecj ) = max( epsilc, chem(i,k,j,p_ecj)*convfac2 )
1056 cblk(1,veci ) = max( epsilc, chem(i,k,j,p_eci)*convfac2 )
1057 cblk(1,vp25aj ) = max( epsilc, chem(i,k,j,p_p25j)*convfac2 )
1058 cblk(1,vp25ai ) = max( epsilc, chem(i,k,j,p_p25i)*convfac2 )
1059 cblk(1,vantha ) = max( epsilc, chem(i,k,j,p_antha)*convfac2 )
1060 cblk(1,vseas ) = max( epsilc, chem(i,k,j,p_seas)*convfac2 )
1061 cblk(1,vsoila ) = max( epsilc, chem(i,k,j,p_soila)*convfac2 )
1062 cblk(1,vnu0 ) = max( epsilc, chem(i,k,j,p_nu0)*convfac2 )
1063 cblk(1,vac0 ) = max( epsilc, chem(i,k,j,p_ac0)*convfac2 )
1064 cblk(1,vcorn ) = max( epsilc, chem(i,k,j,p_corn)*convfac2 )
1066 cblk(1,vh2oaj ) = h2oaj(i,k,j)
1067 cblk(1,vh2oai ) = h2oai(i,k,j)
1070 call modpar( blksize, nspcsda, numcells, &
1073 pmassn, pmassa, pmassc, &
1074 pdensn, pdensa, pdensc, &
1076 dgnuc, dgacc, dgcor, &
1077 knnuc, knacc, kncor )
1079 wetdgnum_add(1) = dgnuc(1)
1080 wetdgnum_add(2) = dgacc(1)
1081 wetdgnum_add(3) = dgcor(1)
1083 wetdens_add(1) = pdensn(1)
1084 wetdens_add(2) = pdensa(1)
1085 wetdens_add(3) = pdensc(1)
1087 alnsg_add(1) = xxlsgn
1088 alnsg_add(2) = xxlsga
1089 alnsg_add(3) = xxlsgc
1091 yextra_add(1:3,1:8) = 0.0
1093 yextra_add(1,5) = pmassn(1)/blkdens(1) ! ug-AP/kg-air = "n-kg-AP"/kg-air
1094 yextra_add(2,5) = pmassa(1)/blkdens(1)
1095 yextra_add(3,5) = pmassc(1)/blkdens(1)
1097 yextra_add(1,6) = cblk(1,vnu3 )*(pirs/6.0)*1.0e9/blkdens(1) ! "n-m3-AP"/kg-air
1098 yextra_add(2,6) = cblk(1,vac3 )*(pirs/6.0)*1.0e9/blkdens(1)
1099 yextra_add(3,6) = cblk(1,vcor3)*(pirs/6.0)*1.0e9/blkdens(1)
1101 yextra_add(1,7) = pdensn(1) ! kg-AP/m3-AP
1102 yextra_add(2,7) = pdensa(1)
1103 yextra_add(3,7) = pdensc(1)
1105 yextra_add(1,8) = dgnuc(1)*exp(1.5*(alnsg_add(1)**2)) ! m
1106 yextra_add(2,8) = dgacc(1)*exp(1.5*(alnsg_add(2)**2))
1107 yextra_add(3,8) = dgcor(1)*exp(1.5*(alnsg_add(3)**2))
1109 yextra_add(1,9) = dginin
1110 yextra_add(2,9) = dginia
1111 yextra_add(3,9) = dginic
1113 yextra_add(1,10) = cblk(1,vnu0 )/blkdens(1) ! #/kg-air
1114 yextra_add(2,10) = cblk(1,vac0 )/blkdens(1) ! #/kg-air
1115 yextra_add(3,10) = cblk(1,vcorn)/blkdens(1) ! #/kg-air
1118 end subroutine sorgam_aer_drydep_prep
1122 !-----------------------------------------------------------------------
1123 subroutine sorgam_aer_drydep_load_ddvel( &
1124 id, ktau, dtstep, config_flags, aer_mech_id, &
1126 nbin_add, depvel0_add, depvel3_add, &
1128 ids,ide, jds,jde, kds,kde, &
1129 ims,ime, jms,jme, kms,kme, &
1130 its,ite, jts,jte, kts,kte )
1132 use module_configure, only: num_moist, num_chem, &
1133 grid_config_rec_type
1134 use module_state_description, only: param_first_scalar, &
1135 p_naai, p_naaj, p_clai, p_claj
1137 use module_data_sorgam
1142 integer, intent(in) :: &
1143 id, ktau, aer_mech_id, &
1144 numgas, nbin_add, i, j
1146 integer, intent(in) :: &
1147 ids, ide, jds, jde, kds, kde, &
1148 ims, ime, jms, jme, kms, kme, &
1149 its, ite, jts, jte, kts, kte
1151 real, intent(in) :: dtstep
1154 dimension( 1:nbin_add ) :: &
1155 depvel0_add, depvel3_add
1157 real, intent(out), &
1158 dimension( its:ite, jts:jte, 1:num_chem ) :: &
1161 type(grid_config_rec_type), intent(in) :: config_flags
1167 real :: vgsa(num_chem)
1169 character(len=160) :: txtaa
1172 if (3 /= nbin_add) then
1173 write(txtaa,'(a,2(1x,i10))') &
1174 '*** sorgam_aer_drydep_load_ddvel - bad nbin_add', &
1176 write(*,'(a)') trim(txtaa)
1177 call wrf_error_fatal( txtaa )
1184 ! vgsa( vso4aj ) = vdep(1, vdmacc )
1185 ! vgsa( vso4ai ) = vdep(1, vdmnuc )
1186 vgsa( vso4aj ) = depvel3_add( 2 )
1187 vgsa( vso4ai ) = depvel3_add( 1 )
1189 vgsa( vnh4aj ) = vgsa( vso4aj )
1190 vgsa( vnh4ai ) = vgsa( vso4ai )
1191 vgsa( vno3aj ) = vgsa( vso4aj )
1192 vgsa( vno3ai ) = vgsa( vso4ai )
1193 if (p_naaj >= param_first_scalar) vgsa( vnaaj ) = vgsa( vso4aj )
1194 if (p_naai >= param_first_scalar) vgsa( vnaai ) = vgsa( vso4ai )
1195 if (p_claj >= param_first_scalar) vgsa( vclaj ) = vgsa( vso4aj )
1196 if (p_clai >= param_first_scalar) vgsa( vclai ) = vgsa( vso4ai )
1197 vgsa( vorgaro1j) = vgsa( vso4aj )
1198 vgsa( vorgaro1i) = vgsa( vso4ai )
1199 vgsa( vorgaro2j) = vgsa( vso4aj )
1200 vgsa( vorgaro2i) = vgsa( vso4ai )
1201 vgsa( vorgalk1j) = vgsa( vso4aj )
1202 vgsa( vorgalk1i) = vgsa( vso4ai )
1203 vgsa( vorgole1j) = vgsa( vso4aj )
1204 vgsa( vorgole1i) = vgsa( vso4ai )
1205 vgsa( vorgba1j ) = vgsa( vso4aj )
1206 vgsa( vorgba1i ) = vgsa( vso4ai )
1207 vgsa( vorgba2j ) = vgsa( vso4aj )
1208 vgsa( vorgba2i ) = vgsa( vso4ai )
1209 vgsa( vorgba3j ) = vgsa( vso4aj )
1210 vgsa( vorgba3i ) = vgsa( vso4ai )
1211 vgsa( vorgba4j ) = vgsa( vso4aj )
1212 vgsa( vorgba4i ) = vgsa( vso4ai )
1213 vgsa( vorgpaj ) = vgsa( vso4aj )
1214 vgsa( vorgpai ) = vgsa( vso4ai )
1215 vgsa( vecj ) = vgsa( vso4aj )
1216 vgsa( veci ) = vgsa( vso4ai )
1217 vgsa( vp25aj ) = vgsa( vso4aj )
1218 vgsa( vp25ai ) = vgsa( vso4ai )
1220 ! vgsa( vantha ) = vdep(1, vdmcor )
1221 vgsa( vantha ) = depvel3_add( 3 )
1222 vgsa( vseas ) = vgsa( vantha )
1223 vgsa( vsoila ) = vgsa( vantha )
1225 ! vgsa( vnu0 ) = vdep(1, vdnnuc )
1226 ! vgsa( vac0 ) = vdep(1, vdnacc )
1227 ! vgsa( vcorn ) = vdep(1, vdncor )
1228 vgsa( vnu0 ) = depvel0_add( 1 )
1229 vgsa( vac0 ) = depvel0_add( 2 )
1230 vgsa( vcorn ) = depvel0_add( 3 )
1232 do l = 1, (num_chem - numgas )
1233 ddvel(i, j, l+numgas ) = vgsa( l )
1238 end subroutine sorgam_aer_drydep_load_ddvel
1242 !------------------------------------------------------------------------
1243 subroutine sorgam_aer_drydepvel_1( &
1245 dgnum, alnsg, aerodens, &
1246 temp, pres, airdens, ustar, wstar, depresist_a, &
1247 airkinvisc, freepath, &
1248 depvel_0, depvel_3, &
1249 depresist_d0, depresist_d3, &
1250 vsettl_0, vsettl_3 )
1252 ! computes the surface layer resistance term and the
1253 ! gravitational settling velocity term for the 0th and 3rd moment
1254 ! of a log-normal aerosol mode
1257 ! dgnum - geometric mean diameter for aerosol number (m)
1258 ! alnsg - natural logarithm of the geometric standard deviation
1259 ! for aerosol number
1260 ! aerodens - aerosol density (dgnum and aerodens are for the
1261 ! actual wet distribution)
1262 ! temp - temperature (K)
1263 ! pres - pressure (Pa)
1264 ! airdens - air density (kg/m^3)
1265 ! ustar - friction velocity (m/s)
1266 ! wstar - convective scale velocity (m/s)
1267 ! depresist_a = aerodynamic resistance (s/m)
1268 ! airkinvisc - air kinematic viscosity (m^2/s)
1269 ! freepath - air molecular freepath (m)
1271 ! depvel_0 - deposition velocity for 0th (number) moment (m/s)
1272 ! depvel_3 - deposition velocity for 3rd (mass ) moment (m/s)
1273 ! depresist_d0/_d3 - surface layer resistance for 0th/3rd moment (s/m)
1274 ! vsettl_0/_3 - gravitational settling velocity for 0th/3rd moment (m/s)
1277 ! use module_data_sorgam, only: boltz, grav, pss0, tss0, threepi, two3
1281 integer, intent(in) :: &
1283 real, intent(in) :: &
1284 dgnum, alnsg, aerodens, &
1285 temp, pres, airdens, ustar, wstar, depresist_a
1286 real, intent(inout) :: &
1287 airkinvisc, freepath
1288 real, intent(out) :: &
1289 depvel_0, depvel_3, &
1290 depresist_d0, depresist_d3, &
1294 ! following are from module_data_sorgam
1295 ! avogadro's constant [ 1/mol ]
1296 real, parameter :: avo=6.0221367e23
1297 ! universal gas constant [ j/mol-k ]
1298 real, parameter :: rgasuniv=8.314510
1299 ! boltzmann's constant [ j / k]
1300 real, parameter :: boltz=rgasuniv/avo
1301 ! mean gravitational acceleration [ m/sec**2 ]
1302 real, parameter :: grav=9.80622
1303 ! starting standard surface pressure [ pa ]
1304 real, parameter :: pss0=101325.0
1305 ! starting standard surface temperature [ k ]
1306 real, parameter :: tss0=288.15
1308 real, parameter :: two3=2.0/3.0
1310 real*8, parameter :: pirs=3.14159265358979324
1312 real, parameter :: threepi=3.0*pirs
1315 real, parameter :: bhat = 1.246 ! constant from cunningham slip correction.
1316 real :: alnsgy2, amu
1317 real :: blkta, blkprs, blkdens
1318 real :: dconst1, dconst1y, dconst2, dconst3y
1319 real :: dchat0y, dchat3y
1321 real :: ey1, esy04, esy08, esy16, esy20, esy28, esy32, esy64
1322 real :: esym20, esym32
1326 real :: ra, rd0y, rd3y
1327 real :: sc0y, sc3y, st0y, st3y
1328 real :: ustfac, utscale
1329 real :: vghat0y, vghat3y
1331 real :: yextra_vdvg(100,3)
1338 ! amu = air dynamic viscosity (kg/m/s)
1339 if (airkinvisc <= 0.0) then
1340 amu = 1.458e-6*blkta*sqrt(blkta)/(blkta+110.4)
1341 airkinvisc = amu/airdens
1343 amu = airkinvisc*airdens
1346 ! air molecular freepath (m)
1347 if (freepath <= 0.0) then
1348 freepath = 6.6328e-8*pss0*blkta/(tss0*blkprs)
1358 ey1 = exp(0.125*alnsgy2)
1361 ! esy12 = esy04*esy04*esy04
1364 ! esy24 = esy12*esy12
1367 ! esy36 = esy16*esy20
1372 knyyy = 2.0*xlm/dgyyy
1374 dconst1 = boltz * blkta / ( threepi * amu )
1375 dconst1y = dconst1 / dgyyy
1377 dconst2 = grav / ( 18.0 * amu )
1378 dconst3y = dconst2 * pdensy * dgyyy**2
1380 dchat0y = dconst1y * ( esy04 + bhat * knyyy * esy16 )
1381 dchat3y = dconst1y * ( esym20 + bhat * knyyy * esym32 )
1382 vghat0y = dconst3y * ( esy16 + bhat * knyyy * esy04 )
1383 vghat3y = dconst3y * ( esy64 + bhat * knyyy * esy28 )
1386 ustfac = ustar * ustar / ( grav * nu)
1387 utscale = ustar + 0.24 * wstar * wstar / ustar
1390 if (iflag_coarse > 0) then
1391 rd0y = 1.0 / ( utscale * ( sc0y**(-two3) ) )
1393 st0y = max( vghat0y * ustfac , 0.01)
1394 rd0y = 1.0 / ( utscale * ( sc0y**(-two3) + 10.0**(-3.0 / st0y) ) )
1397 depvel_0 = vghat0y + 1.0 / ( ra + rd0y + rd0y * ra * vghat0y )
1403 if (iflag_coarse > 0) then
1404 rd3y = 1.0 / ( utscale * ( sc3y**(-two3) ) )
1406 st3y = max( vghat3y * ustfac , 0.01)
1407 rd3y = 1.0 / ( utscale * ( sc3y**(-two3) + 10.0**(-3.0 / st3y) ) )
1410 depvel_3 = vghat3y + 1.0 / ( ra + rd3y + rd3y * ra * vghat3y )
1416 end subroutine sorgam_aer_drydepvel_1
1420 !------------------------------------------------------------------------
1421 subroutine sorgam_aer_drydepvel_2( &
1423 dgnum, alnsg, aerodens, &
1424 temp, pres, airdens, ustar, depresist_a, &
1425 pblh, zntt, rmolm, &
1426 airkinvisc, freepath, &
1427 depvel_0, depvel_3, &
1428 depresist_d0, depresist_d3, &
1429 vsettl_0, vsettl_3 )
1431 ! computes the surface layer resistance term and the
1432 ! gravitational settling velocity term for the 0th and 3rd moment
1433 ! of a log-normal aerosol mode
1436 ! dgnum - geometric mean diameter for aerosol number (m)
1437 ! alnsg - natural logarithm of the geometric standard deviation
1438 ! for aerosol number
1439 ! aerodens - aerosol density (dgnum and aerodens are for the
1440 ! actual wet distribution)
1441 ! temp - temperature (K)
1442 ! pres - pressure (Pa)
1443 ! airdens - air density (kg/m^3)
1444 ! ustar - friction velocity (m/s)
1445 ! wstar - convective scale velocity (m/s)
1446 ! depresist_a = aerodynamic resistance (s/m)
1447 ! airkinvisc - air kinematic viscosity (m^2/s)
1448 ! freepath - air molecular freepath (m)
1450 ! depvel_0 - deposition velocity for 0th (number) moment (m/s)
1451 ! depvel_3 - deposition velocity for 3rd (mass ) moment (m/s)
1452 ! depresist_d0/_d3 - surface layer resistance for 0th/3rd moment (s/m)
1453 ! vsettl_0/_3 - gravitational settling velocity for 0th/3rd moment (m/s)
1456 ! use module_data_sorgam, only: boltz, grav, pss0, sqrt2, sqrtpi, tss0, threepi, two3
1457 ! use module_data_sorgam, only: ngausdv, wgaus, y_gq
1461 integer, intent(in) :: &
1463 real, intent(in) :: &
1464 dgnum, alnsg, aerodens, &
1465 temp, pres, airdens, ustar, depresist_a, pblh, zntt, rmolm
1466 real, intent(inout) :: &
1467 airkinvisc, freepath
1468 real, intent(out) :: &
1469 depvel_0, depvel_3, &
1470 depresist_d0, depresist_d3, &
1474 ! idowescor = 1 means do wesley (85) convective correction to pm dry dep velocities; 0 means dont do correction
1475 integer, parameter :: idowescor = 0
1477 ! following are from module_data_sorgam
1478 ! avogadro's constant [ 1/mol ]
1479 real, parameter :: avo=6.0221367e23
1480 ! universal gas constant [ j/mol-k ]
1481 real, parameter :: rgasuniv=8.314510
1482 ! boltzmann's constant [ j / k]
1483 real, parameter :: boltz=rgasuniv/avo
1484 ! mean gravitational acceleration [ m/sec**2 ]
1485 real, parameter :: grav=9.80622
1486 ! starting standard surface pressure [ pa ]
1487 real, parameter :: pss0=101325.0
1488 ! starting standard surface temperature [ k ]
1489 real, parameter :: tss0=288.15
1490 real*8, parameter :: pirs=3.14159265358979324
1491 real, parameter :: sqrt2=1.4142135623731
1492 real, parameter :: sqrtpi=1.7724539
1493 real, parameter :: two3=2.0/3.0
1494 real, parameter :: threepi=3.0*pirs
1497 real, parameter :: bhat = 1.246 ! constant from cunningham slip correction.
1498 real, parameter :: colctr_bigd=2.e-3,colctr_smald=20.e-6
1499 ! collector diameters in stokes number and interception efficiency (needleleaf forest)
1503 real :: alnsgy2, amu
1504 real :: blkta, blkprs, blkdens
1506 real :: dconst1, dconst2, dconst3, dconst3y
1508 real :: eff_dif, eff_imp, eff_int
1509 real :: ey1, esy04, esy08, esy16, esy20, esy28, esy32, esy64
1513 real :: ra, rbcor, rsurfq
1514 real :: scq, stq, sum0, sum0b, sum3, sum3b
1517 real :: vdplim, vsedq
1519 real :: yextra_vdvg(100,3)
1521 integer, parameter :: ngausdv = 7
1522 real, save :: y_gq(ngausdv), wgaus(ngausdv)
1525 ! define these locally because those in module_data_sorgam
1526 ! are not always initialized
1527 y_gq = (/ -2.651961356835233, &
1528 -1.673551628767471, -0.816287882858965, -0.0, &
1529 0.816287882858965, 1.673551628767471, 2.651961356835233 /)
1530 wgaus = (/ 0.0009717812450995, &
1531 0.05451558281913, 0.4256072526101, 0.8102646175568, &
1532 0.4256072526101, 0.05451558281913, 0.0009717812450995 /)
1538 ! amu = air dynamic viscosity (kg/m/s)
1539 if (airkinvisc <= 0.0) then
1540 amu = 1.458e-6*blkta*sqrt(blkta)/(blkta+110.4)
1541 airkinvisc = amu/airdens
1543 amu = airkinvisc*airdens
1546 ! air molecular freepath (m)
1547 if (freepath <= 0.0) then
1548 freepath = 6.6328e-8*pss0*blkta/(tss0*blkprs)
1558 ey1 = exp(0.125*alnsgy2)
1567 dconst1 = boltz * blkta / ( threepi * amu )
1568 dconst2 = grav / ( 18.0 * amu )
1569 dconst3 = ustar/(9.*amu*colctr_bigd)
1574 if (idowescor.eq.1) then
1575 ! wesley (1985) monin-obukov dependence for convective conditions (sam 10/08)
1576 if (rmolm.lt.0.) then
1577 czh = -1.*pblh*rmolm
1578 if (czh.gt.30.0) then
1579 utscale=0.45*(czh**0.6667)
1581 utscale=1.+((-300.*rmolm)**0.6667)
1584 endif ! end of (idowescor.eq.1) test
1585 utscale = ustar*utscale
1587 sum0 = 0. ; sum0b = 0.
1588 sum3 = 0. ; sum3b = 0.
1591 dq = dgyyy*exp(y_gq(n)*sqrt2*alnsg) ! diameter (m) at quadrature point
1592 knq = 2.*xlm/dq ! knudsen number at quadrature point
1593 cunq = 1.+knq*(1.257+.4*exp(-1.1/knq)) ! cunningham correction factor; pruppacher and klett (1980) eq (12-16)
1594 vsedq = pdensy*dconst2*cunq*dq*dq ! gravitational sedimentation velocity m/s
1595 scq = nu*dq/dconst1/cunq ! schmidt number, brownian diffusion parameter - same as binkowski and shankar
1596 eff_dif = scq**(-two3) ! efficiency term for diffusion - same as binkowski and shankar
1597 stq = dconst3*pdensy*dq**2 ! stokes number, peters and eiden (1992)
1598 eff_imp = (stq/(0.8+stq))**2 ! efficiency term for impaction - peters and eiden (1992)
1599 ! eff_int = 0.3*dq/(colctr_smald+dq) ! slinn (1982) interception term, 0.3 prefac insures .2 cm/s at .2 micron diam.
1600 eff_int = (0.00116+0.0061*zntt)*dq/1.414e-7 ! mckeen(2008) intercptn trm, val of .00421 @ ustr=0.475, diam=.1414 micrn, stable, needleleaf evergreen
1601 if (iflag_coarse > 0) then
1602 eff_int = min(1.,eff_int)
1603 rbcor=exp(-2.0*(stq**0.5)) ! rebound correction factor used in slinn (1982)
1605 rbcor = 1. ! rebound correction factor
1607 vdplim = utscale*(eff_dif+eff_imp+eff_int)*rbcor
1608 ! vdplim = .002*utscale
1609 vdplim = min(vdplim,.02)
1611 vdplim = max(vdplim,1.e-20)
1612 rsurfq = ra+1./vdplim
1613 sum0 = sum0 + wgaus(n)*(vsedq + 1./rsurfq) ! quadrature sum for 0 moment
1614 sum3 = sum3 + wgaus(n)*(vsedq + 1./rsurfq)*dq**3 ! quadrature sum for 3rd moment
1615 sum0b = sum0b + wgaus(n)*(1./rsurfq) ! quadrature sum for 0 moment
1616 sum3b = sum3b + wgaus(n)*(1./rsurfq)*dq**3 ! quadrature sum for 3rd moment
1619 ! normalize 0 moment vdep quadrature sum to sqrt(pi) (and number =1 per unit volume)
1620 depvel_0 = sum0/sqrtpi
1621 !normalize 3 moment quad. sum to sqrt(pi) and 3rd moment analytic sum
1622 depvel_3 = sum3/(sqrtpi*exp((1.5*sqrt2*alnsg)**2)*dgyyy**3)
1624 sum0b = sum0b/sqrtpi
1625 sum3b = sum3b/(sqrtpi*exp((1.5*sqrt2*alnsg)**2)*dgyyy**3)
1627 tmpa = 1.0/max( sum0b, 1.0e-10 )
1628 depresist_d0 = max( (tmpa - ra), 1.0e-10 )
1629 tmpa = 1.0/max( sum3b, 1.0e-10 )
1630 depresist_d3 = max( (tmpa - ra), 1.0e-10 )
1633 ! calculate settling velocity
1634 ! knyyy = 2.0*xlm/dgyyy
1635 ! dconst3y = dconst2 * pdensy * dgyyy**2
1636 ! vsettl_0 = dconst3y * ( esy16 + bhat * knyyy * esy04 )
1637 ! vsettl_3 = dconst3y * ( esy64 + bhat * knyyy * esy28 )
1639 ! following are consistent with the quadrature calcs
1640 vsettl_0 = max( (depvel_0 - sum0b), 0.0 )
1641 vsettl_3 = max( (depvel_3 - sum3b), 0.0 )
1645 end subroutine sorgam_aer_drydepvel_2
1649 !-----------------------------------------------------------------------
1650 subroutine zhang2001_aer_drydepvel_1( &
1651 dg_num_in, lnsig_in, dens_part_in, &
1652 airtemp_in, airdens_in, ustar_in, resist_a_in, &
1653 zhang_optaa, iseason_in, &
1654 isurftype_in, modesurftype, iwetsurf, &
1655 airkinvisc, freepath, &
1656 ido_mom0, ido_mom3, &
1657 depvel_0, depvel_3, &
1658 resist_s0, resist_s3, &
1659 vsettl_0, vsettl_3 )
1660 ! calculates surface deposition velocity of particles
1661 ! L. Zhang, S. Gong, J. Padro, and L. Barrie
1662 ! A size-seggregated particle dry deposition scheme for an atmospheric aerosol module
1663 ! Atmospheric Environment, 35, 549-560, 2001.
1665 ! use physconst, only: gravit, tmelt, rhodair
1670 real :: dg_num_in ! geometric mean diameter of number distribution (m)
1671 real :: lnsig_in ! nat. log. of geometric standard deviation of particles
1672 real :: dens_part_in ! density of particle material (kg/m3)
1673 real :: airdens_in ! air density (kg/m3)
1674 real :: airtemp_in ! air temperature (K)
1675 integer :: zhang_optaa ! 1=as published; 2=modified
1676 integer :: iseason_in ! seasonal category (same as wesely)
1677 integer :: isurftype_in ! surface type id
1678 integer :: modesurftype ! if <= 1, isurftype is zhang et al surface type
1679 ! if >= 2, isurftype is usgs surface type
1680 integer :: iwetsurf ! 1 if surface is wet, 0 if dry
1681 real :: resist_a_in ! aerodynamic resistance (s/m)
1682 real :: ustar_in ! friction velocity (m/s)
1683 real :: airkinvisc ! kinematic viscosity of air (m2/s)
1684 real :: freepath ! mean free path of air molecules (m)
1685 integer :: ido_mom0, ido_mom3 ! flag for do/skip moment 0 & 3 calculations
1688 real :: depvel_0, depvel_3 ! surface deposition velocity for
1689 ! 0th (number) and 3rd (mass) moments (m/s)
1690 real :: resist_s0, resist_s3 ! surface resistances (s/m)
1691 real :: vsettl_0, vsettl_3 ! gravitational settling velocities (m/s)
1694 integer :: iseason, isurftype
1695 integer :: moment ! moment of size distribution (0 for number, 2 for surface area, 3 for volume)
1697 real, parameter :: gravit = 9.806
1698 real, parameter :: boltzmann=1.381e-23 ! J/deg/molecule
1699 real, parameter :: pi = 3.1415926536
1704 real :: cuncorrect ! Cunningham correction factor
1706 real :: depvel ! deposition velocity (m/s)
1708 real :: diffus_part ! particle Brownian diffusivity (m2/s)
1709 real :: dispersion ! accounts for influence of size dist dispersion on bulk settling velocity
1710 ! assuming dp_part is number mode radius * exp(1.5 ln(sigma))
1711 real :: dp_mom ! median diameter (m) for number (when moment=0) or volume (when moment=3)
1712 real :: dp_vm ! volume mean diameter = (6*volume_mixratio/(pi*number_mixratio))*0.333
1713 real :: e_brown ! collection efficiency for Browning diffusion
1714 real :: e_impact ! collection efficiency for impaction
1715 real :: e_intcept ! collection efficiency for interception
1716 real :: e0_brown, e0_impact, e0_intcept ! "tuning factors" for the above
1719 real :: resist_sfc ! surface resistance (s/m)
1720 real :: schmidt ! schmidt number
1721 real :: stickfrac ! fraction of particles sticking to surface
1722 real :: stokes ! stokes number
1725 real :: vsettl ! gravitational settling velocity of particle (m/s)
1726 real :: viscosity ! dynamic viscosity of air (kg/m/s)
1728 real, save :: gammax(15) ! exponent of schmidt number
1729 data gammax/ 0.56, 0.58, 0.56, 0.56, 0.56, &
1730 0.54, 0.54, 0.54, 0.54, 0.54, &
1731 0.54, 0.54, 0.50, 0.50, 0.56/
1733 real, save :: alpha(15) ! parameter for impaction
1734 data alpha/ 1.0, 0.6, 1.1, 0.8, 0.8, &
1735 1.2, 1.2, 50.0, 50.0, 1.3, &
1736 2.0, 50.0, 100.0, 100.0, 1.5/
1738 real, save :: rad_collector(5,15) ! radius (m) of surface collectors
1739 data rad_collector/ &
1740 0.002, 0.002, 0.002, 0.002, 0.002, & ! luc 1
1741 0.005, 0.005, 0.005, 0.005, 0.005, & ! luc 2
1742 0.002, 0.002, 0.005, 0.005, 0.002, & ! luc 3
1743 0.005, 0.005, 0.010, 0.010, 0.005, & ! luc 4
1744 0.005, 0.005, 0.005, 0.005, 0.005, & ! luc 5
1745 0.002, 0.002, 0.005, 0.005, 0.002, & ! luc 6
1746 0.002, 0.002, 0.005, 0.005, 0.002, & ! luc 7
1747 9.999, 9.999, 9.999, 9.999, 9.999, & ! luc 8
1748 9.999, 9.999, 9.999, 9.999, 9.999, & ! luc 9
1749 0.010, 0.010, 0.010, 0.010, 0.010, & ! luc 10
1750 0.010, 0.010, 0.010, 0.010, 0.010, & ! luc 11
1751 9.999, 9.999, 9.999, 9.999, 9.999, & ! luc 12
1752 9.999, 9.999, 9.999, 9.999, 9.999, & ! luc 13
1753 9.999, 9.999, 9.999, 9.999, 9.999, & ! luc 14
1754 0.010, 0.010, 0.010, 0.010, 0.010 / ! luc 15
1756 integer, save :: isurftype_zhang_from_usgs(25) ! maps usgs surface type to zhang type
1757 data isurftype_zhang_from_usgs / &
1758 ! zhang type <--- usgs type ---> wesely type
1759 15, & ! urban 1: urban and built-up land 1 urban
1760 7, & ! crops, mixed farming 2: dryland cropland & pasture 2 agricultural land
1761 7, & ! 3: irrigated crop & pasture 2
1762 7, & ! 4: mix dry/irrig crop & pasture 2
1763 7, & ! 5: cropland/grassland mosaic 2
1764 10, & ! shrubs & woodland 6: cropland/woodland mosaic 4
1765 6, & ! grass 7: grassland 3 range land
1766 6, & ! 8: shrubland 3
1767 6, & ! 9: mixed shrubland/grassland 3
1768 6, & ! 10: savanna 3, (always summer)
1769 4, & ! deciduous broadleaf 11: deciduous broadleaf forest 4 deciduous forest
1770 3, & ! deciduous needle-lf 12: deciduous needleleaf forest 5, (autumn and winter modi)
1771 2, & ! evergreen broadleaf 13: evergreen broadleaf forest 4, (always summer)
1772 1, & ! evergreen needle-lf 14: evergreen needleleaf forest 5 coniferous forest
1773 5, & ! mixed broad/needle-lf 15: mixed forest 6 mixed forest including wetland
1774 14, & ! ocean 16: water bodies 7 water, salt and fresh
1775 11, & ! wetland w plants 17: herbaceous wetland 9
1776 10, & ! 18: wooded wetland 6
1777 8, & ! desert 19: barren or sparsely vegetated 8 barren land, mostly desert
1778 9, & ! tundra 20: herbaceous tundra 9 nonforested wetland
1779 10, & ! 21: wooded tundra 6
1780 9, & ! 22: mixed tundra 6
1781 8, & ! 23: bare ground tundra 8
1782 12, & ! ice cap & glacier 24: snow or ice -, (always winter)
1785 ! zhang 13 (inland water) not used wesley 10 (mixed agric/range)
1786 ! & 11 (rocky w low shrubs) not used
1787 ! (the usgs ---> wesely mapping is used in module_dep_simple
1788 ! and is shown here for reference only)
1792 airtemp = max( 50.0, min( 350.0, airtemp_in ) )
1793 airdens = max( 0.01, min( 5.0, airdens_in ) )
1794 dg_num = max( 1.0e-9, min( 1.0e-2, dg_num_in ) )
1795 dens_part = max( 0.1e3, min( 50.0e3, dens_part_in ) )
1796 lnsig = max( 0.0, min( log(5.0), lnsig_in ) )
1797 resist_a = max( 1.0e-2, min( 1.0e6, resist_a_in ) )
1798 ustar = max( 1.0e-6, min( 1.0e2, ustar_in ) )
1801 if (modesurftype <= 1) then
1802 if ((isurftype_in >= 1) .and. (isurftype_in <= 15)) &
1803 isurftype = isurftype_in
1805 ! map from usgs to zhang surface type
1806 if ((isurftype_in >= 1) .and. (isurftype_in <= 25)) &
1807 isurftype = isurftype_zhang_from_usgs(isurftype_in)
1811 if ((iseason_in >= 1) .and. (iseason_in <= 5)) &
1812 iseason = iseason_in
1814 ! for zhang_optaa = 2, do a modified version of zhang et al (2001)
1815 ! the interception efficiency has a first-order dependence on particle
1816 ! diameter (as in slinn 1982) rather than second order
1817 ! the "overall" e0 factor of 3.0 is changed to 1.0 for brownian diffusion
1818 ! and impaction, and 4.0 for interception
1819 ! note 1 -- e0_brown=e0_impact=1.0 reduces the rather large deposition
1820 ! velocities for very small and very large particle sizes
1821 ! note 2 -- e0_intcept=4.0 is equivalent to using e0_intcept=1.0
1822 ! and dividing the radius_collector by 4.0. this change plus the
1823 ! first-order form for interceptions gives much more interception in
1824 ! the accumulation-mode size range. the interception in the original
1825 ! zhang et al formulation is (surprisingly) almost negligible!
1826 if (zhang_optaa == 2) then
1837 ! following is from subr modpar in module_aerosols_sorgam.F
1838 ! pss0 = 101325.0 ; tss0 = 288.15
1839 ! freepath = 6.6328e-8*pss0*blkta/(tss0*blkprs)
1840 if (freepath <= 0.0) then
1841 freepath = 6.6328e-8*(1.2255/airdens)
1844 if (airkinvisc <= 0.0) then
1845 ! following is from subr modpar in module_aerosols_sorgam.F
1846 ! amu = 1.458e-6*blkta*sqrt(blkta)/(blkta+110.4)
1847 viscosity = 1.458e-6*airtemp*sqrt(airtemp)/(airtemp+110.4)
1848 airkinvisc = viscosity/airdens
1850 viscosity = airkinvisc*airdens
1853 dp_vm = dg_num*exp(1.5*lnsig*lnsig)
1857 if (moment == 0) then
1858 if (ido_mom0 <= 0) then
1864 else if (moment == 3) then
1865 if (ido_mom3 <= 0) then
1875 ! use a maximum radius of 100 microns when calculating deposition velocity
1876 dp_mom = dg_num*exp(float(moment)*lnsig*lnsig)
1877 dp_mom = min( 100.0e-6, dp_mom )
1879 tmpa = 2.0*freepath/dp_mom
1880 cuncorrect = 1. + tmpa*(1.257 + 0.4*exp(-1.10/tmpa))
1881 dispersion = exp(2.*lnsig*lnsig)
1882 vsettl = ( dens_part*(dp_mom**2)*gravit* &
1883 cuncorrect / (18.0*viscosity) ) * dispersion
1885 diffus_part = boltzmann*airtemp*cuncorrect/ &
1886 (3.0*pi*viscosity*dp_mom)
1887 schmidt=airkinvisc/diffus_part
1888 e_brown = schmidt**(-gammax(isurftype))
1890 if (isurftype==8 .or. isurftype==9 .or. &
1891 isurftype==12 .or. isurftype==13 .or. isurftype==14) then
1892 ! non-vegetated surface
1893 stokes = vsettl*ustar*ustar/(gravit*airkinvisc)
1897 stokes = vsettl*ustar/(gravit*rad_collector(iseason,isurftype))
1898 if (zhang_optaa == 2) then
1899 tmpa = 0.5*dp_mom/rad_collector(iseason,isurftype)
1902 tmpa = dp_mom/rad_collector(iseason,isurftype)
1903 e_intcept = 0.5 * tmpa**2
1908 e_impact = ( stokes / (alpha(isurftype)+stokes) )**beta
1910 ! stickfrac = 1 if diameter < 5 um or surface is wet
1911 if ((iwetsurf > 0) .or. &
1912 (isurftype == 13) .or. (isurftype == 14) .or. &
1913 (dp_vm < 5.0e-6)) then
1916 stickfrac = exp(-sqrt(stokes))
1920 ! tmpa = e0*ustar*(e_brown+e_intcept+e_impact)*stickfrac
1921 tmpa = ustar*(e0_brown*e_brown + e0_intcept*e_intcept + e0_impact*e_impact)*stickfrac
1922 resist_sfc = 1./max(tmpa,1.0e-30)
1924 ! depvel = vsettl+1./(resist_a+resist_sfc)
1925 ! use this formula rather than zhang 2001 simple formula
1926 depvel = vsettl + 1./(resist_a + resist_sfc + resist_a*resist_sfc*vsettl)
1928 if (moment == 0) then
1931 resist_s0 = resist_sfc
1935 resist_s3 = resist_sfc
1941 end subroutine zhang2001_aer_drydepvel_1
1943 !-----------------------------------------------------------------------
1944 subroutine cam_mam_aer_drydep_prep( &
1945 id, ktau, dtstep, config_flags, aer_mech_id, &
1947 t_phy, rho_phy, p_phy, alt, p8w, t8w, &
1949 nbin_add, alnsg_add, wetdgnum_add, wetdens_add, &
1952 ids,ide, jds,jde, kds,kde, &
1953 ims,ime, jms,jme, kms,kme, &
1954 its,ite, jts,jte, kts,kte )
1956 use module_configure, only: num_moist, num_chem, &
1957 grid_config_rec_type
1958 use module_state_description, only: param_first_scalar
1960 use module_data_cam_mam_asect
1965 integer, intent(in) :: &
1966 id, ktau, julday, aer_mech_id, nbin_add, &
1969 integer, intent(in) :: &
1970 ids, ide, jds, jde, kds, kde, &
1971 ims, ime, jms, jme, kms, kme, &
1972 its, ite, jts, jte, kts, kte
1974 real, intent(in) :: dtstep, gmt
1977 dimension( ims:ime, kms:kme, jms:jme ) :: &
1978 t_phy, rho_phy, p_phy, alt, p8w, t8w
1981 dimension( ims:ime, kms:kme, jms:jme, 1:num_moist ) :: &
1985 dimension( ims:ime, kms:kme, jms:jme, 1:num_chem ) :: &
1988 real, intent(inout), &
1989 dimension( 1:nbin_add ) :: &
1990 alnsg_add, wetdgnum_add, wetdens_add
1992 real, intent(inout), &
1993 dimension( 1:nbin_add, 10 ) :: &
1996 type(grid_config_rec_type), intent(in) :: config_flags
2000 integer :: ibin, iok, iphase, itype
2003 integer :: l, ll, l1, n
2006 real, parameter :: densdefault = 2.0
2007 real, parameter :: smallmassaa = 1.0e-20
2008 real, parameter :: smallmassbb = 1.0e-30
2009 real, parameter :: pi = 3.1415926536
2010 real, parameter :: piover6 = pi/6.0
2011 real, parameter :: onethird = 1.0/3.0
2013 real :: drydens, drydp, drymass, dryvol
2015 real :: tmpa, tmp_lnsg
2016 real :: wetdgnum, wetdens, wetdp, wetmass, wetvol
2017 real :: wetdgnum_si, wetdens_si
2019 character(len=160) :: txtaa
2022 n = sum( nsize_aer(1:ntype_aer) )
2023 if (n /= nbin_add) then
2024 write(txtaa,'(a,2(1x,i10))') &
2025 '*** cam_mam_aer_drydep_prep - bad nbin_add, sum(nsize)', &
2027 write(*,'(a)') trim(txtaa)
2028 call wrf_error_fatal( txtaa )
2033 ! set some variables to their wrf-chem "standard" values
2034 p1st = param_first_scalar
2038 ! *** for now, just calc vdep_aer for iphase = ai_phase
2041 ! calculate vdep_aer for each type and size
2043 do 2900 itype = 1, ntype_aer
2044 do 2800 n = 1, nsize_aer(itype)
2047 ! calculate dry and wet mass, volume, density, and mass-mean diameters
2050 do ll = 1, ncomp_aer(itype)
2051 l1 = massptr_aer(ll,n,itype,iphase)
2052 tmpa = max( chem(i,k,j,l1), 0.0 )
2053 drymass = drymass + tmpa
2054 dryvol = dryvol + tmpa/dens_aer(ll,itype)
2057 l1 = waterptr_aer(n,itype)
2058 tmpa = max( chem(i,k,j,l1), 0.0 )
2059 wetmass = drymass + tmpa
2060 wetvol = dryvol + tmpa/dens_water_aer
2062 l1 = numptr_aer(n,itype,iphase)
2063 rnum = max( chem(i,k,j,l1), 0.0 )
2065 drymass = drymass*28.966e-9 ! ug/kg-air --> g/mol-air
2066 wetmass = wetmass*28.966e-9
2067 dryvol = dryvol *28.966e-9 ! "u-cm3"/kg-air --> cm3/mol-air
2068 wetvol = wetvol *28.966e-9
2069 rnum = rnum*28.966e-3 ! #/kg-air --> #/mol-air
2071 if (drymass <= smallmassbb) then
2072 drydp = dcen_sect(n,itype)
2073 drydens = densdefault
2078 if (drymass <= smallmassaa) then
2082 drydens = drymass/dryvol
2083 wetdens = wetmass/wetvol
2085 if (rnum >= dryvol/volumlo_sect(n,itype)) then
2086 drydp = dlo_sect(n,itype)
2087 else if (rnum <= dryvol/volumhi_sect(n,itype)) then
2088 drydp = dhi_sect(n,itype)
2090 drydp = (dryvol/(piover6*rnum))**onethird
2093 if (abs(wetvol) > (1000.*abs(dryvol))) then
2096 tmpa=abs(wetvol/dryvol)**onethird
2097 tmpa=max(1.0,min(tmpa,10.0))
2104 ! "within section" size distribution currently assumed to be
2105 ! monodisperse, but could assume otherwise
2106 tmp_lnsg = log( sigmag_aer(n,itype) )
2107 wetdgnum = wetdp * exp( -1.5*tmp_lnsg*tmp_lnsg )
2109 wetdgnum_add(ibin) = wetdgnum * 1.0e-2 ! cm --> m
2110 wetdens_add(ibin) = wetdens * 1.0e3 ! g/cm3 --> kg/m3
2111 alnsg_add(ibin) = tmp_lnsg
2114 yextra_add(ibin,1) = drymass/28.966e-9 ! g/mol-air --> ug/kg-air = "n-kg"/kg-air
2115 yextra_add(ibin,5) = wetmass/28.966e-9
2116 yextra_add(ibin,2) = dryvol/28.966e-6 ! cm3/mol-air --> "n-m3"/kg-air
2117 yextra_add(ibin,6) = wetvol/28.966e-6
2118 yextra_add(ibin,3) = drydens*1.0e3 ! g/cm3 --> kg/m3
2119 yextra_add(ibin,7) = wetdens*1.0e3
2120 yextra_add(ibin,4) = drydp*1.0e-2 ! cm --> m
2121 yextra_add(ibin,8) = wetdp*1.0e-2
2123 yextra_add(ibin,9) = dcen_sect(n,itype)*1.0e-2 ! cm --> m
2124 yextra_add(ibin,10) = rnum/28.966e-3 ! #/mol-air --> #/kg-air
2132 end subroutine cam_mam_aer_drydep_prep
2136 !-----------------------------------------------------------------------
2137 subroutine cam_mam_aer_drydep_load_ddvel( &
2138 id, ktau, dtstep, config_flags, aer_mech_id, &
2140 nbin_add, depvel0_add, depvel3_add, &
2142 ids,ide, jds,jde, kds,kde, &
2143 ims,ime, jms,jme, kms,kme, &
2144 its,ite, jts,jte, kts,kte )
2146 use module_configure, only: num_moist, num_chem, &
2147 grid_config_rec_type
2148 use module_state_description, only: param_first_scalar
2150 use module_data_cam_mam_asect
2155 integer, intent(in) :: &
2156 id, ktau, aer_mech_id, nbin_add, &
2159 integer, intent(in) :: &
2160 ids, ide, jds, jde, kds, kde, &
2161 ims, ime, jms, jme, kms, kme, &
2162 its, ite, jts, jte, kts, kte
2164 real, intent(in) :: dtstep
2167 dimension( 1:nbin_add ) :: &
2168 depvel0_add, depvel3_add
2170 real, intent(out), &
2171 dimension( its:ite, jts:jte, 1:num_chem ) :: &
2174 type(grid_config_rec_type), intent(in) :: config_flags
2178 integer :: ibin, iphase, itype
2181 character(len=160) :: txtaa
2184 n = sum( nsize_aer(1:ntype_aer) )
2185 if (n /= nbin_add) then
2186 write(txtaa,'(a,2(1x,i10))') &
2187 '*** cam_mam_aer_drydep_load_ddvel - bad nbin_add, sum(nsize)', &
2189 write(*,'(a)') trim(txtaa)
2190 call wrf_error_fatal( txtaa )
2195 ! copy from vdep_aer array to ddvel array
2196 do iphase = 1, nphase_aer
2198 do itype = 1, ntype_aer
2199 do n = 1, nsize_aer(itype)
2201 do ll = -2, ncomp_plustracer_aer(itype)
2202 if (iphase /= ai_phase) cycle
2205 l = numptr_aer(n,itype,iphase)
2206 else if (ll == -1) then
2208 if (iphase == ai_phase) l = waterptr_aer(n,itype)
2209 else if (ll == 0) then
2211 if (iphase == ai_phase) l = hyswptr_aer(n,itype)
2213 l = massptr_aer(ll,n,itype,iphase)
2216 if ((l >= param_first_scalar) .and. (l <= num_chem)) then
2217 if (l == numptr_aer(n,itype,iphase)) then
2218 ddvel(i,j,l) = depvel0_add(ibin)
2220 ddvel(i,j,l) = depvel3_add(ibin)
2230 end subroutine cam_mam_aer_drydep_load_ddvel
2234 !-----------------------------------------------------------------------
2235 END MODULE module_aer_drydep