Skip to content

Comments

Add Dynamic lightning scheme#2276

Merged
islas merged 9 commits intowrf-model:developfrom
weiwangncar:dyn-lightning
Feb 20, 2026
Merged

Add Dynamic lightning scheme#2276
islas merged 9 commits intowrf-model:developfrom
weiwangncar:dyn-lightning

Conversation

@weiwangncar
Copy link
Collaborator

@weiwangncar weiwangncar commented Jan 16, 2026

TYPE: new feature

KEYWORDS: dynamic lightning, cloud-to-ground-Lightning, Intracloud Lightning

SOURCE: Barry.H.Lynn@gmail.com; Barry.Lynn@Weather-It-Is.com (Weather It Is, LTD and Hebrew University of Jerusalem), internal

DESCRIPTION OF THE SCHEME:
A new dynamic lightning scheme is added. The scheme of Lynn et al. (2012) is a prognostic lightning parameterization, though it is not an explicit microphysical charging–discharge scheme. Rather than predicting electric charge or electric fields directly, the scheme predicts the temporal evolution of a bulk potential electric energy associated with deep convection.

The prognostic variable evolves from time step to time step and is driven by measures of convective intensity, primarily the vertical velocity and the mass content of key hydrometeors. Lightning discharges are triggered diagnostically when the accumulated potential electric energy exceeds prescribed threshold values, representing the onset of electrical breakdown. Following discharge, the potential energy is reduced, allowing subsequent recharge as convection continues.

The DLS includes a simple scale-aware formulation that adjusts charging intensity relative to the original 4 km configuration.

To run the Dynamic Lightning Scheme add these parameters to the physics section of namelist.input

dyn_lightning_option = 1, 1, 1,
coul_pos = 0.000035, 0.000035,0.000035,
coul_neg = 0.000035, 0.000035,0.000035,
coul_neu = 0.000035, 0.000035,0.000035,

These are charging coefficients are set for
mp_physics = 28, 28, 28,
and can be modified for other microphysical schemes, if needed. For instance, if a scheme does not produce very much cloud water, these values might need to be raised.

One could also modify, j_pos, j_neg, and j_neu, which are threshold values for the breakdown field that control what magnitude of "electric potential energy" must build up to produce an event for each (see Registry/registry.dyn_light). But, this is not recommended as a first step.

References

Lynn, B. H., Yair, Y., Price, C., Kelman, G., & Clark, A. J. (2012). Predicting cloud-to-ground and intracloud lightning in weather forecast models. Weather and Forecasting, 27, 1470–1488. https://doi.org/10.1175/WAF-D-11-00144.1

Lynn, B. H., Kelman, G., & Ellrod, G. (2015). An evaluation of the efficacy of using observed lightning to improve convective lightning forecasts. Weather and Forecasting, 30, 405–423. https://doi.org/10.1175/WAF-D-13-00028.1

Lynn, B. H., Yair, Y., Shpund, J., Levi, Y., Qie, X., & Khain, A. (2020). Using factor separation to elucidate the respective contributions of desert dust and urban pollution to the 4 January 2020 Tel Aviv lightning and flash flood disaster. Journal of Geophysical Research: Atmospheres, 125, e2020JD033520. https://doi.org/10.1029/2020JD033520

Federico, S., Torcasio, R. C., Lagasio, M., Lynn, B. H., Puca, S., & Dietrich, S. (2022). A Year-Long Total Lightning Forecast over Italy with a Dynamic Lightning Scheme and WRF. Remote Sensing, 14, 3244. https://doi.org/10.3390/rs14143244

Federico, S., Torcasio, R. C., Popova, J., Sokol, Z., Pop, L., Lagasio, M., Lynn, B. H., Puca, S., & Dietrich, S. (2024). Improving the lightning forecast with the WRF model and lightning data assimilation: Results of a two-seasons numerical experiment over Italy. Atmospheric Research, 304, 107382. https://doi.org/10.1016/j.atmosres.2024.107382

LIST OF MODIFIED FILES: list of changed files (use git diff --name-status master to get formatted list)

A Registry/registry.dyn_light
M Registry/registry.em_shared_collection
M dyn_em/solve_em.F
M phys/Makefile
M phys/module_microphysics_driver.F
A phys/module_calc_lpi_new.F
A phys/module_ltng_pe.F
A phys/module_ltng_strokes.F
M run/README.namelist

TESTS CONDUCTED:
The Jenkins tests are all passing.

RELEASE NOTE: A new dynamic lightning scheme is added. The scheme of Lynn et al. (2012) is a prognostic lightning parameterization and it predicts the temporal evolution of a bulk potential electric energy associated with deep convection. Activated by dyn_lightning_option = 1. The DLS includes a simple scale-aware formulation that adjusts charging intensity relative to the original 4 km configuration.

…and Hebrew University of Jerusalem)

new file:   Registry/registry.dyn_light
new file:   phys/module_calc_lpi_new.F
new file:   phys/module_ltng_pe.F
new file:   phys/module_ltng_strokes.F
modified:   Registry/registry.em_shared_collection
modified:   dyn_em/solve_em.F
modified:   phys/Makefile
modified:   phys/module_microphysics_driver.F
@weiwangncar weiwangncar requested review from a team as code owners January 16, 2026 20:58
@weiwangncar weiwangncar changed the base branch from master to develop January 16, 2026 21:13
@weiwangncar
Copy link
Collaborator Author

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

@weiwangncar
Copy link
Collaborator Author

@BarryHLynn Can you provide a short description about this scheme? How is it different from other schemes in WRF?

@weiwangncar
Copy link
Collaborator Author

@BarryHLynn How do you define num_light_periods? Is it always 1 in a run?

@BarryHLynn
Copy link

BarryHLynn commented Jan 25, 2026 via email

remove commented out lines when calling microphysics driver.
@BarryHLynn
Copy link

BarryHLynn commented Jan 29, 2026 via email

@dudhia
Copy link
Collaborator

dudhia commented Jan 29, 2026

@weiwangncar could you go ahead and remove the commented package and l_obs from the registry?
We can leave the call in the microphysics driver.

@BarryHLynn
Copy link

BarryHLynn commented Jan 29, 2026 via email

@dudhia
Copy link
Collaborator

dudhia commented Jan 29, 2026

As far as I know, we need the package to output the variables and to advect those that need advecting. Have you enabled this in another way? Barry
I mean you have the package statement twice and the one with l_obs is commented out. We can delete that one.

@BarryHLynn
Copy link

BarryHLynn commented Jan 29, 2026 via email

dudhia
dudhia previously approved these changes Feb 5, 2026
@marybarthbrock
Copy link

I reviewed the PR and have the following comments and questions.
First, this option a good addition to the WRF model as the other lightning options are diagnostic calculations (based on bulk properties of the storm) while this option is prognostic in predicting energy related to charging.

There could be clarification and further information provided in the PR. I initially got the impression that I have to run mp_physics=28 with this new LPI code, but I don't think it is true. So, the text could be revised to say that the code runs with any cloud physics option but the coul_pos, coul_neg, and coul_neu values should be modified when using schemes other than option 28.
Further, it would be nice if the authors provided guidance (if they have it). I say that because I'm often contacted asking for advice on how to use the lightning flash rate diagnostics we added.

There should be guidance about what horizontal grid spacings that the scheme should be used at. The original paper (Lynn et al. 2012) performed simulations at 4-km with one set of tests at 3-km (not much of a change, yet one where changing input parameters improved the results). It sounds like the scheme should only be used for dx<5km and that there should be guidance on how to adjust the parameters when using dx different than 4-km (or whatever base dx the authors are using).

Lastly, it would be good to hear whether the new LPI option could be used with WRF-Chem for predicting lightning-NOx production, which currently uses IC and CG flash rates in its calculation.

@weiwangncar
Copy link
Collaborator Author

@BarryHLynn Please see if you can add more information about the use of the scheme based on Mary's comments. Thanks!

@BarryHLynn
Copy link

BarryHLynn commented Feb 8, 2026 via email

@weiwangncar
Copy link
Collaborator Author

@BarryHLynn It seems some of the key points in your reply to @marybarthbrock can be added to the PR message to help users. Can you do that and make it simple? Thanks.

@BarryHLynn
Copy link

BarryHLynn commented Feb 12, 2026 via email

@weiwangncar
Copy link
Collaborator Author

@BarryHLynn Here it is: #2276.

@BarryHLynn
Copy link

Here it is:

PR: Add Dynamic Lightning Scheme (DLS) to WRF
Summary

This PR adds a new Dynamic Lightning Scheme (DLS) to the Weather Research and Forecasting (WRF) Model.

The DLS is a prognostic lightning parameterization based on:

Lynn, B. H., Yair, Y., Price, C., Kelman, G., & Clark, A. J. (2012), Weather and Forecasting, 27, 1470–1488.

Rather than explicitly predicting electric charge or electric fields, the scheme prognoses a bulk potential electric energy associated with deep convection. Lightning discharges are triggered diagnostically when this energy exceeds prescribed breakdown thresholds. Following discharge, the energy reservoir is reduced, allowing recharge as convection continues.

Scientific Description

The prognostic variable evolves from time step to time step and is driven primarily by:

Vertical velocity

Mass content of key hydrometeors

The scheme is computationally efficient and physically interpretable. It is designed for both convection-allowing and cloud-allowing grid spacings.

Scale Awareness and Microphysics Dependence

The DLS includes a simple scale-aware formulation that adjusts charging intensity relative to the original 4 km configuration.

Lightning intensity is sensitive to charging coefficient settings. Optimal values depend, in part, on:

The amount of liquid water produced by the microphysical scheme

The vigor of the simulated convection

These two factors are not always correlated.

For example:

Simulations using WSM6 may produce less liquid water than Thompson, yet generate more lightning because they often produce stronger convective updrafts.

Spectral Bin Microphysics (SBM), by contrast, typically produces substantially more liquid water than bulk schemes. For this reason, SBM charging coefficients were reduced from approximately 0.35 × 10⁻⁴ (original 4 km settings) to approximately 0.15 × 10⁻⁴ in order to maintain realistic flash rates.

As shown in Federico et al. (2022), seasonal and regime-dependent tuning can further improve performance.

How to Activate

Add the following to the physics section of namelist.input:

dyn_lightning_option = 1, 1, 1,
coul_pos = 0.000035, 0.000035, 0.000035,
coul_neg = 0.000035, 0.000035, 0.000035,
coul_neu = 0.000035, 0.000035, 0.000035,

These values correspond to:

mp_physics = 28, 28, 28,

If using a different microphysical scheme, coefficient values may need adjustment depending on condensate production and convective intensity (as noted above).

Breakdown thresholds (j_pos, j_neg, j_neu) are defined in:

Registry/registry.dyn_light

They are based on breakdown thresholds loosely tied to the altitude (or pressure) of the general origin of the lightning discharges.

Coupling and Applications

This implementation extends the established DLS framework and is compatible with coupled systems such as WRF-Chem.

No additional structural coupling is required beyond passing diagnosed IC and CG flash rates to lightning-NOx parameterizations. As with existing lightning-NOx schemes, a vertical distribution of discharge must be assumed, and the user must decide whether to use IC flashes only or both IC and CG flashes.

Files Added / Modified
A Registry/registry.dyn_light
M Registry/registry.em_shared_collection
M dyn_em/solve_em.F
M phys/Makefile
M phys/module_microphysics_driver.F
A phys/module_calc_lpi_new.F
A phys/module_ltng_pe.F
A phys/module_ltng_strokes.F
M run/README.namelist

References

Lynn, B. H., Yair, Y., Price, C., Kelman, G., & Clark, A. J. (2012). Predicting cloud-to-ground and intracloud lightning in weather forecast models. Weather and Forecasting, 27, 1470–1488. https://doi.org/10.1175/WAF-D-11-00144.1

Lynn, B. H., Kelman, G., & Ellrod, G. (2015). An evaluation of the efficacy of using observed lightning to improve convective lightning forecasts. Weather and Forecasting, 30, 405–423. https://doi.org/10.1175/WAF-D-13-00028.1

Lynn, B. H., Yair, Y., Shpund, J., Levi, Y., Qie, X., & Khain, A. (2020). Using factor separation to elucidate the respective contributions of desert dust and urban pollution to the 4 January 2020 Tel Aviv lightning and flash flood disaster. Journal of Geophysical Research: Atmospheres, 125, e2020JD033520. https://doi.org/10.1029/2020JD033520

Federico, S., Torcasio, R. C., Lagasio, M., Lynn, B. H., Puca, S., & Dietrich, S. (2022). A Year-Long Total Lightning Forecast over Italy with a Dynamic Lightning Scheme and WRF. Remote Sensing, 14, 3244. https://doi.org/10.3390/rs14143244

Federico, S., Torcasio, R. C., Popova, J., Sokol, Z., Pop, L., Lagasio, M., Lynn, B. H., Puca, S., & Dietrich, S. (2024). Improving the lightning forecast with the WRF model and lightning data assimilation: Results of a two-seasons numerical experiment over Italy. Atmospheric Research, 304, 107382. https://doi.org/10.1016/j.atmosres.2024.107382

Testing

All Jenkins tests are passing.

@dudhia
Copy link
Collaborator

dudhia commented Feb 12, 2026

@weiwangncar Are you going to edit the commit message with Barry's new text? Check if it meets your requirements.

@weiwangncar
Copy link
Collaborator Author

@weiwangncar Are you going to edit the commit message with Barry's new text? Check if it meets your requirements.

I've added a few sentences to the PR. If @BarryHLynn is ok with it, this is good to be merged.

@weiwangncar
Copy link
Collaborator Author

@smileMchen @islas Can you review and approve this PR? Thanks!

@BarryHLynn
Copy link

I would make a small change: at the top... lightning parameterization, but it is not an explicit microphysical -- I would change the word "but" to although. I am not sure what is meant by: "This implementation extends the established DLS framework..." The DLS has been in my version of WRF since 2012, and "lended" out to interested researchers. Has it been coupled with wrf-chem now? Otherwise, all is fine. Thank you for making this happen.

@weiwangncar
Copy link
Collaborator Author

I would make a small change: at the top... lightning parameterization, but it is not an explicit microphysical -- I would change the word "but" to although. I am not sure what is meant by: "This implementation extends the established DLS framework..." The DLS has been in my version of WRF since 2012, and "lended" out to interested researchers. Has it been coupled with wrf-chem now? Otherwise, all is fine. Thank you for making this happen.

@BarryHLynn Changed 'but' to 'though'. The sentence 'This implementation extends the established DLS framework' is copied from your comment made about 5 days ago. If you don't like it now, we can change it. This may be to answer Mary's question whether the lightning scheme can be used with WRF-Chem. We don't have to have this comment in the PR if we are not sure.

@BarryHLynn
Copy link

BarryHLynn commented Feb 17, 2026 via email

@weiwangncar
Copy link
Collaborator Author

@smileMchen @islas PR updated, and ready for review and approval.

islas
islas previously approved these changes Feb 19, 2026
@BarryHLynn
Copy link

BarryHLynn commented Feb 19, 2026 via email

to trigger a test.
To trigger a test.
@weiwangncar
Copy link
Collaborator Author

@islas @dudhia Need both of you to re-approve this PR. Thanks!

@islas islas merged commit 618de03 into wrf-model:develop Feb 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants