satpy.readers.grib module

Generic Reader for GRIB2 files.

Currently this reader depends on the pygrib python package. The eccodes package from ECMWF is preferred, but does not support python 3 at the time of writing.

class satpy.readers.grib.GRIBFileHandler(filename, filename_info, filetype_info)[source]

Bases: BaseFileHandler

Generic GRIB file handler.

Open grib file and do initial message parsing.

_analyze_messages(grib_file)[source]
_area_def_from_msg(msg)[source]
static _convert_datetime(msg, date_key, time_key, date_format='%Y%m%d%H%M')[source]
static _correct_cyl_minmax_xy(proj_params, min_lon, min_lat, max_lon, max_lat)[source]
static _correct_proj_params_over_prime_meridian(proj_params)[source]
_create_dataset_ids(keys)[source]
_get_area_info(msg, proj_params)[source]
static _get_corner_lonlat(proj_params, lons, lats)[source]
static _get_corner_xy(proj_params, lons, lats, scans_positively)[source]
_get_cyl_area_info(msg, proj_params)[source]
static _get_cyl_minmax_lonlat(lons, lats)[source]
static _get_extents(min_x, min_y, max_x, max_y, shape)[source]
_get_message(ds_info)[source]
available_datasets(configured_datasets=None)[source]

Automatically determine datasets provided by this file.

property end_time

Get end time of this entire file.

Assumes the last message is the latest message.

get_area_def(dsid)[source]

Get area definition for message.

If latlong grid then convert to valid eqc grid.

get_dataset(dataset_id, ds_info)[source]

Read a GRIB message into an xarray DataArray.

get_metadata(msg, ds_info)[source]

Get metadata.

property start_time

Get start time of this entire file.

Assumes the first message is the earliest message.