satpy.readers.li_l2_nc module

MTG Lightning Imager (LI) Level-2 (L2) unified reader.

This reader supports reading all the products from the LI L2 processing level:

Point products:
  • L2-LE Lightning Events

  • L2-LEF Lightning Events Filtered

  • L2-LFL Lightning Flashes

  • L2-LGR Lightning Groups

Accumulated products:
  • L2-AF Accumulated Flashes

  • L2-AFA Accumulated Flash Area

  • L2-AFR Accumulated Flash Radiance

Per default, the unified LI L2 reader returns the data either as an 1-D array or as a 2-D array depending on the product type.

Point-based products (LE, LEF, LFL, LGR) are “classic” lightning products consisting of values with attached latitude and longitude coordinates. Hence, these products are provided by the reader as 1-D arrays, with a pyresample.geometry.SwathDefinition area attribute containing the points lat-lon coordinates.

Accumulated products (AF, AFA, AFR) are the result of temporal accumulation of events (e.g. over 30 seconds), and are gridded in the FCI 2km geostationary projection grid, in order to facilitate the synergistic usage together with FCI. Compared to the point products, the gridded products also give information about the spatial extent of the lightning activity. Hence, these products are provided by the reader as 2-D arrays in the FCI 2km grid as per intended usage, with a pyresample.geometry.AreaDefinition area attribute containing the grid geolocation information. In this way, the products can directly be overlaid to FCI data.

Note

L2 accumulated products retrieved from the archive (that have “ARC” in the filename) contain data for 20 repeat cycles (timesteps) covering 10 minutes of sensing time. For these files, when loading the main variables (accumulated_flash_area, flash_accumulation, flash_radiance), the reader will cumulate (sum up) the data for the entire sensing period of the file. A solution to access easily each timestep is being worked on. See https://github.com/pytroll/satpy/issues/2878 for possible workarounds in the meanwhile.

If needed, the accumulated products can also be accessed as 1-d array by setting the reader kwarg with_area_definition=False, e.g.:

scn = Scene(filenames=filenames, reader="li_l2_nc", reader_kwargs={'with_area_definition': False})

For both 1-d and 2-d products, the lat-lon coordinates of the points/grid pixels can be accessed using e.g. scn['dataset_name'].attrs['area'].get_lonlats().

See the LI L2 Product User Guide PUG for more information.

class satpy.readers.li_l2_nc.LIL2NCFileHandler(filename, filename_info, filetype_info, with_area_definition=True)[source]

Bases: LINCFileHandler

Implementation class for the unified LI L2 satpy reader.

Initialize LIL2NCFileHandler.

get_area_def(dsid)[source]

Compute area definition for a dataset, only supported for accumulated products.

get_array_on_fci_grid(data_array: DataArray)[source]

Obtain the accumulated products as a (sparse) 2-d array.

The array has the shape of the FCI 2 km grid (5568x5568px), and will have an AreaDefinition attached.

get_dataset(dataset_id, ds_info=None)[source]

Get the dataset and apply gridding if requested.

is_var_with_swath_coord(dsid)[source]

Check if the variable corresponding to this dataset is listed as variable with swath coordinates.

satpy.readers.li_l2_nc._np_add_at_wrapper(target_array, indices, data)[source]