1.5.1.1.7.1.1. polar2grid.readers._base module

Base class and other utilities for wrapping Satpy readers.

class polar2grid.readers._base.ReaderProxyBase(scn: Scene, user_products: list[str])[source]

Bases: object

Helper to provide Polar2Grid-specific information about a reader.

In the most common cases, a subclass should define the following:

  • is_polar2grid_reader or is_geo2grid_reader: If this reader should be used for Polar2Grid or Geo2Grid.

  • get_default_products: Get a list of Polar2Grid names (not Satpy names or DataQuery objects) that should be loaded if the user hasn’t specified any.

  • get_all_products: Get all Polar2Grid names that this reader could possibly load. This list of products will be used by other methods to determine what available products for loading are custom or Satpy products and what products are “guaranteed” products from Polar2Grid/Geo2Grid.

  • _aliases: A property that returns a dictionary mapping Polar2Grid name for a product to a Satpy DataQuery or name.

property _alias_handler
property _aliases: dict[str, Union[satpy.dataset.dataid.DataQuery, str]]
property _binary_name
_create_alias_handler(allow_empty_list=False)[source]
apply_p2g_name_to_scene(scn: Scene)[source]

Add a ‘p2g_name’ attribute to each DataArray in the provided Scene.

classmethod from_reader_name(reader_name: str, *args)[source]
get_all_products() list[str][source]

Get all polar2grid products that could be loaded.

get_available_products(p2g_product_names: Optional[list[str]] = None, possible_satpy_ids: Optional[list[satpy.dataset.dataid.DataID]] = None) tuple[list[str], list[str]][source]

Get custom/satpy products and polar2grid products that are available for loading.

get_default_products() list[str][source]

Get products to load if user hasn’t specified any others.

get_satpy_products_to_load() Optional[list[Union[satpy.dataset.dataid.DataQuery, str]]][source]

Get Satpy product names and DataQuery objects to load.

get_user_custom_products()[source]
is_geo2grid_reader: bool = False
is_polar2grid_reader: bool = False