satpy.readers.viirs_sdr module

Interface to VIIRS SDR format.

This reader implements the support of VIIRS SDR files as produced by CSPP and CLASS. It is comprised of two parts:

  • A subclass of the YAMLFileReader class to allow handling all the files

  • A filehandler class to implement the actual reading

Format documentation:

class satpy.readers.viirs_sdr.VIIRSSDRFileHandler(filename, filename_info, filetype_info, use_tc=None, **kwargs)[source]

Bases: JPSS_SDR_FileHandler

VIIRS SDR HDF5 File Reader.

Initialize file handler.

get_bounding_box()[source]

Get the bounding box of this file.

get_dataset(dataset_id, ds_info)[source]

Get the dataset corresponding to dataset_id.

The size of the return DataArray will be dependent on the number of scans actually sensed, and not necessarily the regular 768 scanlines that the file contains for each granule. To that end, the number of scans for each granule is read from: Data_Products/...Gran_x/N_Number_Of_Scans.

class satpy.readers.viirs_sdr.VIIRSSDRReader(config_files, use_tc=None, **kwargs)[source]

Bases: FileYAMLReader

Custom file reader for finding VIIRS SDR geolocation at runtime.

Initialize file reader and adjust geolocation preferences.

Parameters:
  • config_files (iterable) – yaml config files passed to base class

  • use_tc (boolean) – If True use the terrain corrected files. If False, switch to non-TC files. If None (default), use TC if available, non-TC otherwise.

_abc_impl = <_abc._abc_data object>
_create_new_geo_file_handlers(geo_filenames)[source]
_geo_dataset_groups(c_info)[source]
_get_coordinates_for_dataset_key(dsid)[source]

Get the coordinate dataset keys for dsid.

Wraps the base class method in order to load geolocation files from the geo reference attribute in the datasets file.

_get_file_handlers(dsid)[source]

Get the file handler to load this dataset.

_get_primary_secondary_geo_groups(ds_info)[source]

Find out which geolocation files are needed.

_is_viirs_dataset(datasets)[source]
_load_filenames_from_geo_ref(dsid)[source]

Load filenames from the N_GEO_Ref attribute of a dataset’s file.

_remove_datasets_from_files(filename_items, files_to_edit, considered_datasets)[source]
_remove_geo_datasets_from_files(filename_items, files_to_edit)[source]
_remove_non_viirs_datasets_from_files(filename_items, files_to_edit)[source]
_remove_not_loaded_geo_dataset_group(c_dataset_groups, prime_geo, second_geo)[source]
filter_filenames_by_info(filename_items)[source]

Filter out file using metadata from the filenames.

This sorts out the different lon and lat datasets depending on TC is desired or not.

get_right_geo_fhs(dsid, fhs)[source]

Find the right geographical file handlers for given dataset ID dsid.

satpy.readers.viirs_sdr._get_invalid_info(granule_data)[source]

Get a detailed report of the missing data.

N/A: not applicable MISS: required value missing at time of processing OBPT: onboard pixel trim (overlapping/bow-tie pixel removed during SDR processing) OGPT: on-ground pixel trim (overlapping/bow-tie pixel removed during EDR processing) ERR: error occurred during processing / non-convergence ELINT: ellipsoid intersect failed / instrument line-of-sight does not intersect the Earth’s surface VDNE: value does not exist / processing algorithm did not execute SOUB: scaled out-of-bounds / solution not within allowed range

satpy.readers.viirs_sdr.split_desired_other(fhs, prime_geo, second_geo)[source]

Split the provided filehandlers fhs into desired filehandlers and others.