satpy.readers.core.hdfeos module

Base HDF-EOS reader.

class satpy.readers.core.hdfeos.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.

__init__(filename, filename_info, filetype_info, **kwargs)[source]

Initialize the base reader.

_add_satpy_metadata(data_id, data_arr)[source]

Add metadata that is specific to Satpy.

_chunks_for_variable(hdf_dataset)[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)[source]
Return type:

int

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.core.hdfeos.HDFEOSGeoReader(filename, filename_info, filetype_info, **kwargs)[source]

Bases: HDFEOSBaseFileReader

Handler for the geographical datasets.

Initialize the geographical reader.

DATASET_NAMES = {'height': 'Height', 'landsea_mask': 'Land/SeaMask', 'latitude': 'Latitude', 'longitude': 'Longitude', 'range': 'Range', 'satellite_azimuth_angle': ('SensorAzimuth', 'Sensor_Azimuth'), 'satellite_zenith_angle': ('SensorZenith', 'Sensor_Zenith'), 'solar_azimuth_angle': ('SolarAzimuth', 'SolarAzimuth'), 'solar_zenith_angle': ('SolarZenith', 'Solar_Zenith'), 'water_present': 'WaterPresent'}
__init__(filename, filename_info, filetype_info, **kwargs)[source]

Initialize the geographical reader.

static _geo_resolution_for_l1b(metadata)[source]
static _geo_resolution_for_l2_l1b(metadata)[source]
_interpolate_using_sza(data1, data2, resolution)[source]
Return type:

tuple[DataArray, DataArray]

_load_ds_by_name(ds_name)[source]

Attempt loading using multiple common names.

_load_interpolated_angle_pair_uncached(name1, name2, resolution)[source]
Return type:

tuple[DataArray, DataArray]

_load_interpolated_lonlat_pair_uncached(name1, name2, resolution)[source]
Return type:

tuple[DataArray, DataArray]

property geo_resolution

Resolution of the geographical data retrieved in the metadata.

get_dataset(dataset_id, dataset_info)[source]

Get the geolocation dataset.

Return type:

DataArray

get_interpolated_dataset(dataset_name, resolution)[source]

Load and interpolate datasets.

Return type:

DataArray

static is_geo_loadable_dataset(dataset_name)[source]

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

Return type:

bool

static read_geo_resolution(metadata)[source]

Parse metadata to find the geolocation resolution.

satpy.readers.core.hdfeos._find_and_run_interpolation(interpolation_functions, src_resolution, dst_resolution, args)[source]
satpy.readers.core.hdfeos._get_good_data_mask(arr, fill_value, is_category=False)[source]
satpy.readers.core.hdfeos._interpolate_no_angles(clons, clats, src_resolution, dst_resolution)[source]
satpy.readers.core.hdfeos._interpolate_with_angles(clons, clats, csatz, src_resolution, dst_resolution)[source]
satpy.readers.core.hdfeos._mapblocks_scale_and_mask(arr, scale_factor, add_offset, fill_value, is_category)[source]
satpy.readers.core.hdfeos._modis_date(date)[source]

Transform a date and time string into a datetime object.

satpy.readers.core.hdfeos._scale_and_mask_data_array(data_arr, 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

Return type:

DataArray

satpy.readers.core.hdfeos.interpolate(clons, clats, csatz, src_resolution, dst_resolution)[source]

Interpolate two parallel datasets jointly.