satpy.readers.viirs_edr module

VIIRS NOAA enterprise EDR product reader.

This module defines the VIIRSJRRFileHandler file handler, to be used for reading VIIRS EDR products generated by the NOAA enterprise suite, which are downloadable via NOAA CLASS or on NOAA’s AWS buckets.

A wide variety of such products exist and, at present, only a subset are supported.

  • Cloud mask:

  • Cloud products:

  • Aerosol detection:

  • Aerosol optical depth:

  • Surface reflectance:

  • Land Surface Temperature:

All products use the same base reader viirs_edr and can be read through satpy with:

import satpy
import glob

filenames = glob.glob('JRR-ADP*.nc')
scene = satpy.Scene(filenames, reader='viirs_edr')


Multiple products contain datasets with the same name! For example, both the cloud mask and aerosol detection files contain a cloud mask, but these are not identical. For clarity, the aerosol file cloudmask is named cloud_mask_adp in this reader.

Vegetation Indexes

The NDVI and EVI products can be loaded from CSPP-produced Surface Reflectance files. By default, these products are filtered based on the Surface Reflectance Quality Flags. This is used to remove/mask pixels in certain cloud or water regions. This behavior can be disabled by providing the reader keyword argument filter_veg and setting it to False. For example:

scene = satpy.Scene(filenames, reader='viirs_edr', reader_kwargs={"filter_veg": False})

AOD Filtering

The AOD (Aerosol Optical Depth) product can be optionally filtered based on Quality Control (QC) values in the file. By default no filtering is performed. By providing the aod_qc_filter keyword argument and specifying the maximum value of the QCAll variable to include (not mask). For example:

scene = satpy.Scene(filenames, reader='viirs_edr', reader_kwargs={"aod_qc_filter": 1})

will only preserve AOD550 values where the quality is 0 (“high”) or 1 (“medium”). At the time of writing the QCAll variable has 1 (“medium”), 2 (“low”), and 3 (“no retrieval”).

class satpy.readers.viirs_edr.VIIRSAODHandler(*args, aod_qc_filter: int | None = None, **kwargs)[source]

Bases: VIIRSJRRFileHandler

File handler for AOD data files.

Initialize file handler and keep track of QC filtering.

_mask_invalid(data_arr: DataArray, ds_info: dict) DataArray[source]
class satpy.readers.viirs_edr.VIIRSJRRFileHandler(filename, filename_info, filetype_info, **kwargs)[source]

Bases: BaseFileHandler

NetCDF4 reader for VIIRS Active Fires.

Initialize the geo filehandler.

static _decode_flag_meanings(data_arr: DataArray)[source]
_dynamic_variables_from_file(handled_var_names: set) Iterable[tuple[bool, dict]][source]
_mask_invalid(data_arr: DataArray, ds_info: dict) DataArray[source]
static _rename_dims(data_arr: DataArray) DataArray[source]

Get information of available datasets in this file.


configured_datasets (list) – Series of (bool or None, dict) in the same way as is returned by this method (see below). The bool is whether the dataset is available from at least one of the current file handlers. It can also be None if no file handler before us knows how to handle it. The dictionary is existing dataset metadata. The dictionaries are typically provided from a YAML configuration file and may be modified, updated, or used as a “template” for additional available datasets. This argument could be the result of a previous file handler’s implementation of this method.


Iterator of (bool or None, dict) pairs where dict is the dataset’s metadata. If the dataset is available in the current file type then the boolean value should be True, False if we know about the dataset but it is unavailable, or None if this file object is not responsible for it.

property end_time

Get last date/time when observations were recorded.

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

Get the dataset.

property platform_name

Get platform name.

rows_per_scans(data_arr: DataArray) int[source]

Get number of array rows per instrument scan based on data resolution.

property start_time

Get first date/time when observations were recorded.

class satpy.readers.viirs_edr.VIIRSLSTHandler(*args, **kwargs)[source]

Bases: VIIRSJRRFileHandler

File handler to handle LST file scale factor and offset weirdness.

Initialize the file handler and unscale necessary variables.

_manual_scalings = {'Satellite_Azimuth_Angle': ('AZI_ScaleFact', 'AZI_Offset'), 'VLST': ('LST_ScaleFact', 'LST_Offset'), 'emis_bbe': ('LSE_ScaleFact', 'LSE_Offset'), 'emis_m15': ('LSE_ScaleFact', 'LSE_Offset'), 'emis_m16': ('LSE_ScaleFact', 'LSE_Offset')}
class satpy.readers.viirs_edr.VIIRSSurfaceReflectanceWithVIHandler(*args, filter_veg: bool = True, **kwargs)[source]

Bases: VIIRSJRRFileHandler

File handler for surface reflectance files with optional vegetation indexes.

Initialize file handler and keep track of vegetation index filtering.

_get_veg_index_good_mask() Array[source]
_mask_invalid(data_arr: DataArray, ds_info: dict) DataArray[source]