satpy.readers.seviri_l2_grib module

Reader for the SEVIRI L2 products in GRIB2 format.


FM 92 GRIB Edition 2 EUMETSAT Product Navigator

class satpy.readers.seviri_l2_grib.SeviriL2GribFileHandler(filename, filename_info, filetype_info)[source]

Bases: BaseFileHandler

Reader class for SEVIRI L2 products in GRIB format.

Read the global attributes and prepare for dataset reading.


Create a dictionary of attributes to be added to the dataset.


A dictionary of parameter attributes.

ssp_lon: longitude of subsatellite point sensor: name of sensor platform_name: name of the platform

Return type:


static _get_from_msg(gid, key)[source]

Get a value from the GRIB message based on the key, return None if missing.

  • gid – The ID of the GRIB message.

  • key – The key of the required attribute.


The retrieved attribute or None if the key is missing.


Compute the dictionary with the projection and area definition from a GRIB message.


gid – The ID of the GRIB message.


A tuple of two dictionaries for the projection and the area definition.

a: Earth major axis [m] b: Earth minor axis [m] h: Height over surface [m] ssp_lon: longitude of subsatellite point [deg] nlines: number of lines ncols: number of columns a_name: name of the area a_desc: description of the area p_id: id of the projection


center_point: coordinate of the center point north: coodinate of the north limit east: coodinate of the east limit west: coodinate of the west limit south: coodinate of the south limit

Return type:



Read the values from the GRIB message and return a DataArray object.


gid – The ID of the GRIB message.


The array containing the retrieved values.

Return type:



Read the parameter attributes from the message and create the projection and area dictionaries.

static _scale_earth_axis(data)[source]

Scale Earth axis data to make sure the value matched the expected unit [m].

The earthMinorAxis value stored in the aerosol over sea product is scaled incorrectly by a factor of 1e8. This method provides a flexible temporarily workaraound by making sure that all earth axis values are scaled such that they are on the order of millions of meters as expected by the reader. As soon as the scaling issue has been resolved by EUMETSAT this workaround can be removed.

property end_time

Return the sensing end time.


Return the area definition for a dataset.

get_dataset(dataset_id, dataset_info)[source]

Get dataset using the parameter_number key in dataset_info.

In a previous version of the reader, the attributes (nrows, ncols, ssp_lon) and projection information (pdict and area_dict) were computed while initializing the file handler. Also the code would break out from the While-loop below as soon as the correct parameter_number was found. This has now been revised becasue the reader would sometimes give corrupt information about the number of messages in the file and the dataset dimensions within a given message if the file was only partly read (not looping over all messages) in an earlier instance.

property start_time

Return the sensing start time.