1 ! WRF:MODEL_LAYER:PHYSICS
3 ! Lightning flash rate prediction based on max vert. verlocity. Implemented
4 ! for resolutions permitting resolved deep convection.
6 ! Price, C., and D. Rind (1992), A Simple Lightning Parameterization for Calculating
7 ! Global Lightning Distributions, J. Geophys. Res., 97(D9), 9919-9933, doi:10.1029/92JD00719.
9 ! Wong, J., M. Barth, and D. Noone (2012), Evaluating a Lightning Parameterization
10 ! at Resolutions with Partially-Resolved Convection, GMDD, in preparation.
12 ! Unlike previous implementation, this version will produce slightly inconsistent
13 ! IC and CG grid-flash rates against NO emission after production via calling
14 ! lightning_nox_decaria.
16 ! Contact: J. Wong <johnwong@ucar.edu>
18 !**********************************************************************
20 MODULE module_ltng_crmpr92
23 SUBROUTINE ltng_crmpr92w ( &
24 ! Frequently used prognostics
25 dx, dy, xland, ht, z, t, &
26 ! Scheme specific prognostics
27 w, refl, reflthreshold, cellcount, &
28 ! Scheme specific namelist inputs
30 ! Order dependent args for domain, mem, and tile dims
31 ids, ide, jds, jde, kds, kde, &
32 ims, ime, jms, jme, kms, kme, &
33 ips, ipe, jps, jpe, kps, kpe, &
34 ! Mandatory output for all quantitative schemes
37 !-----------------------------------------------------------------
39 USE module_state_description
42 USE module_model_constants
45 USE module_dm, only: wrf_dm_max_real
48 !-----------------------------------------------------------------
50 ! Frequently used prognostics
51 REAL, INTENT(IN ) :: dx, dy
53 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN ) :: xland, ht
54 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN ) :: z, t
56 ! Scheme specific prognostics
57 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN ) :: w
58 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN ) :: refl
59 REAL, INTENT(IN ) :: reflthreshold
60 REAL, DIMENSION( kms:kme ), INTENT(IN ) :: cellcount
62 ! Scheme specific namelist inputs
63 INTEGER, INTENT(IN ) :: cellcount_method
65 ! Order dependent args for domain, mem, and tile (patch) dims
66 INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde
67 INTEGER, INTENT(IN ) :: ims,ime, jms,jme, kms,kme
68 INTEGER, INTENT(IN ) :: ips,ipe, jps,jpe, kps,kpe
70 ! Mandatory outputs for all quantitative schemes
71 REAL, DIMENSION( ims:ime, jms:jme ), INTENT( OUT) :: total_flashrate
74 REAL :: wmax ! max w in patch or domain
75 REAL :: total_fr,ave_fr ! cloud flash rate
79 CHARACTER (LEN=250) :: message
81 !-----------------------------------------------------------------
83 total_flashrate( ips:ipe,jps:jpe ) = 0.
85 IF ( maxval(cellcount(kps:kpe)) .eq. 0 ) RETURN
87 ! Compute flash rate across cell
88 wmax = maxval(w(ips:ipe,kps:kpe,jps:jpe))
89 IF ( cellcount_method .eq. 2 ) THEN
90 wmax = wrf_dm_max_real(wmax)
93 total_fr = 5.7e-6 * wmax**4.5
95 ! Locating widest part of convective core
97 maxcount = cellcount(kps)
99 IF ( cellcount(k) .gt. maxcount ) THEN
101 maxcount = cellcount(k)
105 ! Distributing across convective core
106 ave_fr = total_fr/maxcount/60.
107 WHERE( refl(ips:ipe,k_maxcount,jps:jpe) .gt. reflthreshold )
108 total_flashrate(ips:ipe,jps:jpe) = ave_fr
111 END SUBROUTINE ltng_crmpr92w
113 SUBROUTINE ltng_crmpr92z ( &
114 ! Frequently used prognostics
115 dx, dy, xland, ht, z, t, &
116 ! Scheme specific prognostics
117 refl, reflthreshold, cellcount, &
118 ! Scheme specific namelist inputs
120 ! Order dependent args for domain, mem, and tile dims
121 ids, ide, jds, jde, kds, kde, &
122 ims, ime, jms, jme, kms, kme, &
123 ips, ipe, jps, jpe, kps, kpe, &
124 ! Mandatory output for all quantitative schemes
127 !-----------------------------------------------------------------
129 USE module_state_description
132 USE module_model_constants
135 USE module_dm, only: wrf_dm_max_real
138 !-----------------------------------------------------------------
140 ! Frequently used prognostics
141 REAL, INTENT(IN ) :: dx, dy
143 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN ) :: xland, ht
144 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN ) :: z, t
146 ! Scheme specific prognostics
147 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN ) :: refl
148 REAL, INTENT(IN ) :: reflthreshold
149 REAL, DIMENSION( kms:kme ), INTENT(IN ) :: cellcount
151 ! Scheme specific namelist inputs
152 INTEGER, INTENT(IN ) :: cellcount_method
154 ! Order dependent args for domain, mem, and tile (patch) dims
155 INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde
156 INTEGER, INTENT(IN ) :: ims,ime, jms,jme, kms,kme
157 INTEGER, INTENT(IN ) :: ips,ipe, jps,jpe, kps,kpe
159 ! Mandatory outputs for all quantitative schemes
160 REAL, DIMENSION( ims:ime, jms:jme ), INTENT( OUT) :: total_flashrate
163 REAL :: zmax ! max w in patch or domain
164 REAL :: total_fr,ave_fr ! cloud flash rate
166 INTEGER :: k_maxcount, count
167 REAL :: maxcount, mostlyLand
168 CHARACTER (LEN=250) :: message
170 !-----------------------------------------------------------------
172 total_flashrate( ips:ipe,jps:jpe ) = 0.
174 IF ( maxval(cellcount(kps:kpe)) .eq. 0 ) RETURN
176 ! Compute flash rate across cell
178 do while ( cellcount(k) .eq. 0 .and. k .gt. kps)
186 IF ( (refl(i,k,j) .gt. reflthreshold) .and. (t(i,k,j) .lt. 273.15) ) THEN
187 IF (z(i,k,j)-ht(i,j) .gt. zmax) THEN
188 zmax = z(i,k,j)-ht(i,j)
191 mostlyland = mostlyland + xland(i,j)
195 mostlyland = mostlyland/count
198 WRITE(message, * ) ' ltng_crmpr92z: reflectivity cloud top height: ', zmax
199 CALL wrf_debug ( 15, message )
201 if ( cellcount_method .eq. 2 ) THEN
202 zmax = wrf_dm_max_real(zmax)
205 if ( mostlyLand .lt. 1.5 ) then
206 total_fr = 3.44E-5 * (zmax**4.9) ! PR 92 continental eq
208 total_fr = 6.57E-6 * (zmax**4.9) ! Michalon 99 marine eq
211 ! Locating widest part of convective core
213 maxcount = cellcount(kps)
215 IF ( cellcount(k) .gt. maxcount ) THEN
217 maxcount = cellcount(k)
221 ! Distributing across convective core
222 ave_fr = total_fr/maxcount/60.
223 WHERE( refl(ips:ipe,k_maxcount,jps:jpe) .gt. reflthreshold )
224 total_flashrate(ips:ipe,jps:jpe) = ave_fr
227 END SUBROUTINE ltng_crmpr92z
229 !**********************************************************************
231 ! Price and Rind 1993 base on cold cloud depth (CCD)
233 ! Price, C. and D. Rind (1993), What determines the cloud-to-ground lightning
234 ! fraction in thunderstorms?, Geophys. Res. Lett., 20(6), 463-466, doi:10.1029/93GL00226.
236 ! Valid range of CCD is set to 5.5-14 km. Beyond this range CCD is assumed
237 ! to be 5.5 or 14 for continuity.
239 !**********************************************************************
240 SUBROUTINE iccg_crm_pr93( &
241 refl, reflthreshold, t, z, &
242 ! Order dependent args for domain, mem, and tile dims
243 ids, ide, jds, jde, kds, kde, &
244 ims, ime, jms, jme, kms, kme, &
245 ips, ipe, jps, jpe, kps, kpe, &
249 ic_flashrate, cg_flashrate &
251 !-----------------------------------------------------------------
253 !-----------------------------------------------------------------
255 REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN ) :: refl, t, z
256 REAL, INTENT(IN ) :: reflthreshold
258 ! Order dependent args for domain, mem, and tile dims
259 INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde
260 INTEGER, INTENT(IN ) :: ims,ime, jms,jme, kms,kme
261 INTEGER, INTENT(IN ) :: ips,ipe, jps,jpe, kps,kpe
263 ! Primary inputs and outpus
264 REAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN ) :: total_flashrate
265 REAL, DIMENSION( ims:ime, jms:jme ), INTENT( OUT) :: ic_flashrate, cg_flashrate
268 INTEGER :: kfreeze, ktop
271 REAL :: ratio, cgfrac, depth
273 REAL, PARAMETER :: dH_min = 5.5
274 REAL, PARAMETER :: dH_max = 14.
276 REAL, PARAMETER :: coef_A = 0.021
277 REAL, PARAMETER :: coef_B = -0.648
278 REAL, PARAMETER :: coef_C = 7.493
279 REAL, PARAMETER :: coef_D = -36.54
280 REAL, PARAMETER :: coef_E = 63.09
281 !-----------------------------------------------------------------
283 ic_flashrate(ips:ipe,jps:jpe) = 0.
284 cg_flashrate(ips:ipe,jps:jpe) = 0.
288 IF ( total_flashrate(i,j) .gt. 0.) THEN
290 do while ( refl(i,ktop,j) .lt. reflthreshold .and. ktop .gt. kps)
295 DO WHILE ( t(i,kfreeze,j) .lt. 273.15 .and. kfreeze .gt. kps )
296 kfreeze = kfreeze - 1
299 depth = ( z(i,ktop,j) - z(i,kfreeze,j) ) * 1E-3
300 IF (depth .le. 0.) CONTINUE
301 depth = max( dH_min, min( dH_max, depth ))
303 ratio = (((coef_A*depth+coef_B )*depth+coef_C)*depth+coef_D)*depth+coef_E
304 cgfrac = 1./(ratio+1.)
306 cg_flashrate(i,j) = total_flashrate(i,j) * cgfrac
307 ic_flashrate(i,j) = total_flashrate(i,j) - cg_flashrate(i,j)
312 END SUBROUTINE iccg_crm_pr93
314 END MODULE module_ltng_crmpr92