satpy.readers.hdfeos_base module

Base HDF-EOS reader.

class satpy.readers.hdfeos_base.HDFEOSBaseFileReader(filename, filename_info, filetype_info, **kwargs)[source]

Bases: BaseFileHandler

Base file handler for HDF EOS data for both L1b and L2 products.

Initialize the base reader.

_add_satpy_metadata(data_id: DataID, data_arr: DataArray)[source]

Add metadata that is specific to Satpy.

_chunks_for_variable(hdf_dataset)[source]
_get_good_data_mask(data_arr, is_category=False)[source]
static _get_res_multiplier(var_shape)[source]
_load_all_metadata_attributes()[source]
_platform_name_from_filename()[source]
_read_dataset_in_file(dataset_name)[source]
classmethod _read_mda(lines, element=None)[source]
_resolution_to_rows_per_scan(resolution: int) int[source]
_scale_and_mask_data_array(data, is_category=False)[source]

Unscale byte data and mask invalid/fill values.

MODIS requires unscaling the in-file bytes in an unexpected way:

data = (byte_value - add_offset) * scale_factor

See the below L1B User’s Guide Appendix C for more information:

https://mcst.gsfc.nasa.gov/sites/default/files/file_attachments/M1054E_PUG_2017_0901_V6.2.2_Terra_V6.2.1_Aqua.pdf

classmethod _split_line(line, lines)[source]
_start_time_from_filename()[source]
property end_time

Get the end time of the dataset.

load_dataset(dataset_name, is_category=False)[source]

Load the dataset from HDF EOS file.

property metadata_platform_name

Platform name from the internal file metadata.

classmethod read_mda(attribute)[source]

Read the EOS metadata.

property start_time

Get the start time of the dataset.

class satpy.readers.hdfeos_base.HDFEOSGeoReader(filename, filename_info, filetype_info, **kwargs)[source]

Bases: HDFEOSBaseFileReader

Handler for the geographical datasets.

Initialize the geographical reader.

DATASET_NAMES = {'latitude': 'Latitude', 'longitude': 'Longitude', 'satellite_azimuth_angle': ('SensorAzimuth', 'Sensor_Azimuth'), 'satellite_zenith_angle': ('SensorZenith', 'Sensor_Zenith'), 'solar_azimuth_angle': ('SolarAzimuth', 'SolarAzimuth'), 'solar_zenith_angle': ('SolarZenith', 'Solar_Zenith')}
static _geo_resolution_for_l1b(metadata)[source]
static _geo_resolution_for_l2_l1b(metadata)[source]
_load_ds_by_name(ds_name)[source]

Attempt loading using multiple common names.

property geo_resolution

Resolution of the geographical data retrieved in the metadata.

get_dataset(dataset_id: DataID, dataset_info: dict) DataArray[source]

Get the geolocation dataset.

get_interpolated_dataset(name1, name2, resolution, offset=0)[source]

Load and interpolate datasets.

static is_geo_loadable_dataset(dataset_name: str) bool[source]

Determine if this dataset should be loaded as a Geo dataset.

static read_geo_resolution(metadata)[source]

Parse metadata to find the geolocation resolution.

satpy.readers.hdfeos_base._find_and_run_interpolation(interpolation_functions, src_resolution, dst_resolution, args)[source]
satpy.readers.hdfeos_base._interpolate_no_angles(clons, clats, src_resolution, dst_resolution)[source]
satpy.readers.hdfeos_base._interpolate_with_angles(clons, clats, csatz, src_resolution, dst_resolution)[source]
satpy.readers.hdfeos_base.interpolate(clons, clats, csatz, src_resolution, dst_resolution)[source]

Interpolate two parallel datasets jointly.