radarx.retrieve.lightning.vertical_source_distribution#

radarx.retrieve.lightning.vertical_source_distribution(obj, z, *, interval=None, time_edges=None, min_sources=10, distance=3000.0, time=0.15, n_threads=None, engine='auto')[source]#

Height distribution of LMA sources and flash initiations.

Parameters:
  • obj (xarray.Dataset) – LMA sources (radarx.io.read_lma()), with or without flashes. Select a region first, e.g. with ds.where(..., drop=True) on event_latitude/event_longitude.

  • z (array-like) – Height bin centres above mean sea level (m).

  • interval (str or timedelta, optional) – Length of the time intervals. Default: one interval spanning all sources.

  • time_edges (array-like of datetime64, optional) – Explicit time interval edges.

  • min_sources, distance, time, engine, n_threads – As in grid_lightning().

Returns:

xarray.Dataset – source_count and flash_initiation_count on (time, z).

Notes

Flashes and the min_sources default are as in grid_lightning() and cluster_flashes(), with their references.

Dask. This function computes the dask array: the distribution is built from all sources. The input is loaded into memory and the result is held in memory.