Skip to content

Add Dynamic lightning scheme#2276

Open
weiwangncar wants to merge 6 commits intowrf-model:developfrom
weiwangncar:dyn-lightning
Open

Add Dynamic lightning scheme#2276
weiwangncar wants to merge 6 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 CHANGES:
A new dynamic lightning scheme is added. The scheme of Lynn et al. (2012) is a prognostic lightning parameterization, but 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.

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.

The original paper is: Lynn, H. B., Y. Yair, C. Price, G. Kelman, and A. J. Clark, 2012: Predicting cloud-to-ground and intracloud lightning in weather forecast models. Wea. Forecasting, 27, 1470–1488. https://doi.org/10.1175/WAF-D-11-00144.1. Additional papers were published since then. One can also reference this paper: Stefano Federico, Rosa Claudia Torcasio, Jana Popova, Zbyněk Sokol, Lukáš Pop, Martina Lagasio, Barry H. Lynn, Silvia Puca, Stefano Dietrich,
Improving the lightning forecast with the WRF model and lightning data assimilation: Results of a two-seasons numerical experiment over Italy, Atmospheric Research, Volume 304, 2024, 107382, ISSN 0169-8095, 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.

…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

@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

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.

4 participants