module_data_mosaic_asect.F
References to this file elsewhere.
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.
6 !
7 ! MOSAIC module: see module_mosaic_driver.F for information and terms of use
8 !**********************************************************************************
9 module module_data_mosaic_asect
10
11
12 implicit none
13
14
15 !-----------------------------------------------------------------------
16 !
17 ! The variables in this module provide a means of organizing and accessing
18 ! aerosol species in the "chem" array by their chemical component,
19 ! size bin (or mode), "type", and "phase"
20 !
21 ! Their purpose is to allow flexible coding of process modules,
22 ! compared to "hard-coding" using the chem array p_xxx indices
23 ! (e.g., p_so4_a01, p_so4_a02, ...; p_num_a01, ...)
24 !
25 !-----------------------------------------------------------------------
26 !
27 ! rce & sg 2004-dec-03 - added phase and type capability,
28 ! which changed this module almost completely
29 !
30 !-----------------------------------------------------------------------
31 !
32 ! maxd_atype = maximum allowable number of aerosol types
33 ! maxd_asize = maximum allowable number of aerosol size bins
34 ! maxd_acomp = maximum allowable number of chemical components
35 ! in each aerosol size bin
36 ! maxd_aphase = maximum allowable number of aerosol phases
37 ! (gas, cloud, ice, rain, ...)
38 !
39 ! ntype_aer = number of aerosol types
40 ! The aerosol type will allow treatment of an externally mixed
41 ! aerosol. The current MOSAIC code has only 1 type, with the implicit
42 ! assumption of internal mixing. Eventually, multiple types
43 ! could treat fresh primary BC/OC, fresh SO4 from nucleation,
44 ! aged BC/OC/SO4/... mixture, soil dust, sea salt, ...
45 !
46 ! nphase_aer = number of aerosol phases
47 !
48 ! ai_phase = phase (p) index for interstitial (unactivated) aerosol particles
49 ! cw_phase = phase (p) index for aerosol particles in cloud water
50 ! ci_phase = phase (p) index for aerosol particles in cloud ice
51 ! rn_phase = phase (p) index for aerosol particles in rain
52 ! sn_phase = phase (p) index for aerosol particles in snow
53 ! gr_phase = phase (p) index for aerosol particles in graupel
54 ! [Note: the value of "xx_phase" will be between 1 and nphase_aer
55 ! for phases that are active in a simulation. The others
56 ! will have non-positive values.]
57 !
58 ! nsize_aer(t) = number of aerosol size bins for aerosol type t
59 !
60 ! ncomp_aer(t) = number of "regular" chemical components for aerosol type t
61 ! ncomp_plustracer_aer(t) = number of "regular" plus "tracer"
62 ! chemical components for aerosol type t
63 ! [Note: only "regular" components are used for calculating
64 ! aerosol physical (mass, volume) and chemical properties.
65 ! "Tracer" components are optional, and can be used to track source
66 ! regions, source mechanisms, etc.]
67 ! [Note: for aerosol type t, all phases have the same number of size
68 ! bins, and all size bins have the same number of
69 ! both regular and tracer components.]
70 !
71 ! ntot_mastercomp_aer = number of aerosol chemical components defined
72 ! in the "master component list".
73 ! [Note: each aerosol type will use some but not necessarily all
74 ! of the components in the "master component list".]
75 !
76 ! mastercompptr_aer(c,t) = the position/index/i.d. in the
77 ! "master component list" for chemical component c of aerosol type t.
78 ! (1=sulfate, others to be defined by user.)
79 !
80 ! massptr_aer(c,s,t,p) = the position/index in the chem array for mixing-
81 ! ratio for chemical component c, size bin s, type t, and phase p.
82 !
83 ! lptr_so4_aer(s,t,p) = the position/index in the chem array for mixing-
84 ! ratio for sulfate for aerosol size bin s, type t, and phase p
85 ! (similar lptr's are defined for no3, cl, msa, co3,
86 ! nh4, na, ca, oin, oc, bc, ...)
87 ! [Note: the massptr_aer allow you to loop over all species of
88 ! an aerosol type. The lptr_so4_aer, etc., allow you to access
89 ! a specific chemical component.]
90 !
91 ! waterptr_aer(s,t) = the position/index in the chem array for mixing-
92 ! ratio of aerosol water content for size bin s, type t.
93 ! [Note: water content is only carried for the interstitial aerosol
94 ! phase, so there is no p dimension.]
95 !
96 ! hyswptr_aer(s,t) = the position/index in the chem array for mixing-
97 ! ratio of aerosol "hysteresis water" content for size bin s, type t.
98 ! This is used to determine if aerosol is in the dry or wet state, when
99 ! the ambient RH is between the crystallization and deliquescence RH.
100 ! [Note: hysteresis water content is only carried for the
101 ! interstitial aerosol phase, so there is no p dimension.]
102 !
103 ! numptr_aer(s,t,p) = the position/index in the chem array for mixing-
104 ! ratio of particle number for size bin s, type t, and phase p.
105 !
106 ! mprognum_aer(s,t,p) - if positive, number mixing-ratio for size s, type t,
107 ! and phase p will be prognosed. Otherwise, it is diagnosed using
108 ! mass mixing-ratio add assumed/prescribed size.
109 !
110 ! mixing ratio (moles-water/mole-air) for water
111 ! associated with aerosol size bin s and type t
112 !
113 !
114 ! mastercompindx_so4_aer = the position/index in the
115 ! "master component list" for sulfate.
116 ! (similar lptr's are defined for no3, cl, msa, co3,
117 ! nh4, na, ca, oin, oc, bc, ...)
118 ! [Note: the mastercompindx_xxx_aer are used primarily in
119 ! initialization routines, and generally aren't needed elsewhere.]
120 !
121 !-----------------------------------------------------------------------
122 !
123 ! dens_mastercomp_aer(mc) = dry density (g/cm^3) of component mc
124 ! of the master component list.
125 ! dens_aer(c,t) = dry density (g/cm^3) of aerosol chemical component
126 ! c of type t
127 ! [Note: dens_aer(c,t) == dens_mastercomp_aer(mastercompptr_aer(c,t))
128 ! The dens_mastercomp_aer is used in some initialization routines.
129 ! The dens_aer is used in most other places because of convenience.]
130 !
131 ! mw_mastercomp_aer(mc) = molecular weight (g/mole) of component mc
132 ! of the master component list.
133 ! mw_aer(c,t) = molecular weight (g/mole) of aerosol chemical component
134 ! c of type t
135 ! [Note: mw_aer(c,t) == mw_mastercomp_aer(mastercompptr_aer(c,t)) ]
136 !
137 ! name_mastercomp_aer(mc) = name of component mc of the
138 ! master component list (e.g., "sulfate", "nitrate", ...).
139 ! name_aer(c,t) = molecular weight (g/mole) of aerosol chemical component
140 ! c of type t
141 ! [Note: name_aer(c,t) == name_mastercomp_aer(mastercompptr_aer(c,t)) ]
142 !
143 ! hygro_mastercomp_aer(mc) = bulk hygroscopicity (--) at dilute conditions
144 ! (RH near 100%) of component mc of the master component list.
145 ! hygro_aer(c,t) = bulk hygroscopicity (--) at dilute conditions
146 ! (RH near 100%) of aerosol chemical component c of type t
147 ! [For definition of bulk hygroscopicity,
148 ! see Abdul-Razzak and Ghan, 2004, J Geophys Res, V105, p. 6837-6844.]
149 ! [Note: hygro_aer(c,t) == hygro_mastercomp_aer(mastercompptr_aer(c,t)) ]
150 !
151 !-----------------------------------------------------------------------
152 !
153 ! volumlo_sect(s,t) = 1-particle volume (cm^3) at lower boundary of section m
154 ! volumhi_sect(s,t) = 1-particle volume (cm^3) at upper boundary of section m
155 ! volumcen_sect(s,t)= 1-particle volume (cm^3) at "center" of section m
156 !
157 ! dlo_sect(s,t) = 1-particle diameter (cm) at lower boundary of section m
158 ! dhi_sect(s,t) = 1-particle diameter (cm) at upper boundary of section m
159 ! dcen_sect(s,t) = 1-particle diameter (cm) at "center" section m
160 !
161 ! [Note: the "center" values are defined as follows:
162 ! volumcen_sect == 0.5*(volumlo_sect + volumhi_sect)
163 ! == (pi/6) * (dcen_sect**3) ]
164 !
165 !-----------------------------------------------------------------------
166 !
167 ! msectional - if positive, each aerosol size bin is a section.
168 ! if equals 10, use jacobson moving center
169 ! if equals 20, use tzivion mass-number advection
170 ! if zero/negative, each size bin is a mode (aitken, accumulation, ...)
171 !
172 ! maerosolincw - if positive, both unactivated/interstitial and activated
173 ! aerosol species are simulated. if zero/negative, only the
174 ! unactivated are simulated. [maerosolincw>0 only when cw_phase>0]
175 !
176 ! maerocoag - if positive, aerosol coagulation is done.
177 ! If zero/negative, it is skipped.
178 ! (This is not yet implemented in WRF-Chem.)
179 !
180 ! maerchem - if positive, aerosol gas-particle condensation/evaporation
181 ! of inorganic species is done. If zero/negative, it is skipped.
182 ! (This is not yet implemented in WRF-Chem.)
183 !
184 ! maerchem_boxtest_output - if positive, "boxtest" output is done from
185 ! the aerchemistry routine. If zero/negative, it is skipped.
186 ! (This is not yet implemented in WRF-Chem.)
187 !
188 ! maeroptical - if positive, aerosol optical properties are calculated.
189 ! If zero/negative, it is skipped.
190 ! (This is not yet implemented in WRF-Chem.)
191 !
192 !-----------------------------------------------------------------------
193
194 integer, parameter :: maxd_atype = 1
195 integer, parameter :: maxd_asize = 8
196 integer, parameter :: maxd_acomp = 12
197 integer, parameter :: maxd_aphase = 2
198
199 integer, save :: ai_phase = -999888777
200 integer, save :: cw_phase = -999888777
201 integer, save :: ci_phase = -999888777
202 integer, save :: rn_phase = -999888777
203 integer, save :: sn_phase = -999888777
204 integer, save :: gr_phase = -999888777
205
206 integer, save :: ntype_aer = 0 ! number of types
207 integer, save :: ntot_mastercomp_aer = 0 ! number of master components
208 integer, save :: nphase_aer = 0 ! number of phases
209
210 integer, save :: &
211 nsize_aer( maxd_atype ), & ! number of size bins
212 ncomp_aer( maxd_atype ), & ! number of chemical components
213 ncomp_plustracer_aer( maxd_atype ), &
214 mastercompptr_aer(maxd_acomp, maxd_atype), & ! mastercomp index
215 massptr_aer( maxd_acomp, maxd_asize, maxd_atype, maxd_aphase ), &
216 ! index for mixing ratio
217 waterptr_aer( maxd_asize, maxd_atype ), & ! index for aerosol water
218 hyswptr_aer( maxd_asize, maxd_atype ), &
219 numptr_aer( maxd_asize, maxd_atype, maxd_aphase ), &
220 ! index for the number mixing ratio
221 mprognum_aer(maxd_asize,maxd_atype,maxd_aphase)
222
223
224 ! these indices give the location in the "mastercomp list" of
225 ! the different aerosol chemical (or tracer) components
226 integer, save :: mastercompindx_so4_aer = -999888777
227 integer, save :: mastercompindx_no3_aer = -999888777
228 integer, save :: mastercompindx_cl_aer = -999888777
229 integer, save :: mastercompindx_msa_aer = -999888777
230 integer, save :: mastercompindx_co3_aer = -999888777
231 integer, save :: mastercompindx_nh4_aer = -999888777
232 integer, save :: mastercompindx_na_aer = -999888777
233 integer, save :: mastercompindx_ca_aer = -999888777
234 integer, save :: mastercompindx_oin_aer = -999888777
235 integer, save :: mastercompindx_oc_aer = -999888777
236 integer, save :: mastercompindx_bc_aer = -999888777
237
238
239 real, save :: &
240 dens_aer( maxd_acomp, maxd_atype ), &
241 dens_mastercomp_aer( maxd_acomp ), &
242 mw_mastercomp_aer( maxd_acomp ), &
243 mw_aer( maxd_acomp, maxd_atype ), &
244 hygro_mastercomp_aer( maxd_acomp ), &
245 hygro_aer( maxd_acomp, maxd_atype )
246
247 real, save :: &
248 volumcen_sect( maxd_asize, maxd_atype ), &
249 volumlo_sect( maxd_asize, maxd_atype ), &
250 volumhi_sect( maxd_asize, maxd_atype ), &
251 dcen_sect( maxd_asize, maxd_atype ), &
252 dlo_sect( maxd_asize, maxd_atype ), &
253 dhi_sect( maxd_asize, maxd_atype ), &
254 sigmag_aer(maxd_asize, maxd_atype)
255
256 character*10, save :: &
257 name_mastercomp_aer( maxd_acomp ), &
258 name_aer( maxd_acomp, maxd_atype )
259
260 integer, save :: &
261 lptr_so4_aer(maxd_asize, maxd_atype, maxd_aphase), &
262 lptr_msa_aer(maxd_asize, maxd_atype, maxd_aphase), &
263 lptr_no3_aer(maxd_asize, maxd_atype, maxd_aphase), &
264 lptr_cl_aer(maxd_asize, maxd_atype, maxd_aphase), &
265 lptr_co3_aer(maxd_asize, maxd_atype, maxd_aphase), &
266 lptr_nh4_aer(maxd_asize, maxd_atype, maxd_aphase), &
267 lptr_na_aer(maxd_asize, maxd_atype, maxd_aphase), &
268 lptr_ca_aer(maxd_asize, maxd_atype, maxd_aphase), &
269 lptr_oin_aer(maxd_asize, maxd_atype, maxd_aphase), &
270 lptr_oc_aer(maxd_asize, maxd_atype, maxd_aphase), &
271 lptr_bc_aer(maxd_asize, maxd_atype, maxd_aphase)
272
273 ! rce 11-sep-2004 - eliminated all of the "..._wrfch" pointers
274 ! so now there is only one set of pointers ("..._amode")
275 ! sg/rce nov-2004 - totally new pointer system - "..._aer"
276
277
278 ! molecular weights (g/mol)
279 real, parameter :: mw_so4_aer = 96.066
280 real, parameter :: mw_no3_aer = 62.007
281 real, parameter :: mw_cl_aer = 35.450
282 real, parameter :: mw_msa_aer = 96.109
283 real, parameter :: mw_co3_aer = 60.007
284 real, parameter :: mw_nh4_aer = 18.042
285 real, parameter :: mw_na_aer = 22.990
286 real, parameter :: mw_ca_aer = 40.080
287 real, parameter :: mw_oin_aer = 1.0
288 real, parameter :: mw_oc_aer = 1.0
289 real, parameter :: mw_bc_aer = 1.0
290 real, parameter :: mw_water_aer = 18.016
291
292 ! dry densities (g/cm3)
293 real, parameter :: dens_so4_aer = 1.80
294 real, parameter :: dens_no3_aer = 1.80
295 real, parameter :: dens_cl_aer = 2.20
296 real, parameter :: dens_msa_aer = 1.80
297 real, parameter :: dens_co3_aer = 2.60
298 real, parameter :: dens_nh4_aer = 1.80
299 real, parameter :: dens_na_aer = 2.20
300 real, parameter :: dens_ca_aer = 2.60
301 real, parameter :: dens_oin_aer = 2.60
302 real, parameter :: dens_oc_aer = 1.00
303 real, parameter :: dens_bc_aer = 1.70
304
305 ! water density (g/cm3)
306 ! real, parameter :: dens_water_asize = 1.0
307 real, parameter :: dens_water_aer = 1.0
308
309 ! hygroscopicities (dimensionless)
310 real, parameter :: hygro_so4_aer = 0.5
311 real, parameter :: hygro_no3_aer = 0.5
312 real, parameter :: hygro_ca_aer = 0.1
313 real, parameter :: hygro_co3_aer = 0.1
314 real, parameter :: hygro_nh4_aer = 0.5
315 real, parameter :: hygro_msa_aer = 0.58
316 real, parameter :: hygro_cl_aer = 1.16
317 real, parameter :: hygro_na_aer = 1.16
318 real, parameter :: hygro_oin_aer = 0.14
319 real, parameter :: hygro_oc_aer = 0.14
320 real, parameter :: hygro_bc_aer = 1.e-6
321
322
323 integer, save :: &
324 msectional, maerosolincw, &
325 maerocoag, maerchem, maeroptical, maerchem_boxtest_output
326
327
328 !-----------------------------------------------------------------------
329 ! the following arrays are used during "column calculations" within
330 ! mosaic modules
331 !
332 ! aqvoldry_sub(n,k,m) = dry-volume (cm^3-aerosol/mole-air) for mode n,
333 ! layer k, subarea m
334 ! aqmassdry_sub(n,k,m) = dry-mass (g-aerosol/mole-air) for mode n, ...
335 ! adrydens_sub(n,k,m) = dry-density (g-aerosol/cm^3-aerosol) for mode n, ...
336 ! == amassdry_sub/avoldry_sub
337 ! awetdens_sub(n,k,m) = wet-density (g-aerosol/cm^3-aerosol) for mode n, ...
338 !
339 ! admeandry_sub(n,k,m) = current mean dry-diameter (cm)
340 ! for unactivated aerosol in mode n, layer k, subarea m.
341 ! (Used in sectional code)
342 ! admeanwet_sub(n,k,m) = current mean wet-diameter (cm)
343 ! for unactivated aerosol in mode n, layer k, subarea m.
344 ! (Used in sectional code)
345 !
346 ! awetdens_sfc(n,i,j) = wet-density for mode n and k=1. This value is
347 ! saved after the second pass thru subr. aerosol_wetsize
348 ! for use in subr. bounds
349 ! admeanwet_sfc(n,i,j) = mean wet-diameter for mode n and k=1.
350 ! This value is saved after the second pass thru
351 ! subr. aerosol_wetsize for use in subr. bounds
352 !
353 !
354 ! following are used in aerosol growth routine and are locally
355 ! defined for the current layer (k) and subarea (m)
356 ! drymass_pregrow(n) = dry-mass (g/mole-air) for section n
357 ! before the aerosol growth
358 ! drymass_aftgrow(n) = dry-mass (g/mole-air) for section n
359 ! after the growth but before inter-section transfer
360 ! drydens_pregrow(n) = dry-density (g/cm3) for section n
361 ! before the aerosol growth
362 ! drydens_aftgrow(n) = dry-density (g/cm3) for section n
363 ! after the growth but before inter-section transfer
364 !
365 !-----------------------------------------------------------------------
366
367 ! integer, parameter :: imaxd_asize = 78
368 ! integer, parameter :: jmaxd_asize = 28
369 integer, parameter :: kmaxd_asize = 100
370 integer, parameter :: nsubareamaxd_asize = 5
371
372 ! rce 22-jul-2006 - added maxd_atype dimension to following 6 arrays
373 ! and changed avoldry_sub,amassdry_sub to aqvoldry_sub,aqmassdry_sub
374 real, save :: aqvoldry_sub( maxd_asize,maxd_atype,kmaxd_asize,nsubareamaxd_asize)
375 real, save :: aqmassdry_sub(maxd_asize,maxd_atype,kmaxd_asize,nsubareamaxd_asize)
376 real, save :: adrydens_sub( maxd_asize,maxd_atype,kmaxd_asize,nsubareamaxd_asize)
377 real, save :: awetdens_sub( maxd_asize,maxd_atype,kmaxd_asize,nsubareamaxd_asize)
378 real, save :: admeandry_sub(maxd_asize,maxd_atype,kmaxd_asize,nsubareamaxd_asize)
379 real, save :: admeanwet_sub(maxd_asize,maxd_atype,kmaxd_asize,nsubareamaxd_asize)
380
381 ! real, save :: awetdens_sfc(maxd_asize,imaxd_asize,jmaxd_asize)
382 ! real, save :: admeanwet_sfc(maxd_asize,imaxd_asize,jmaxd_asize)
383
384 real, save :: drymass_pregrow(maxd_asize,maxd_atype)
385 real, save :: drydens_pregrow(maxd_asize,maxd_atype)
386 real, save :: drymass_aftgrow(maxd_asize,maxd_atype)
387 real, save :: drydens_aftgrow(maxd_asize,maxd_atype)
388
389 ! table lookup of aerosol impaction/interception
390 ! scavenging rates
391 real dlndg_nimptblgrow
392 integer nimptblgrow_mind, nimptblgrow_maxd
393 parameter (nimptblgrow_mind=-7, nimptblgrow_maxd=12)
394 real scavimptblnum(4, nimptblgrow_mind:nimptblgrow_maxd, maxd_asize, maxd_atype), &
395 scavimptblvol(4, nimptblgrow_mind:nimptblgrow_maxd, maxd_asize, maxd_atype)
396
397
398 end module module_data_mosaic_asect