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: JRR-CloudMask_v2r3_j01_s202112250807275_e202112250808520_c202112250837300.nc

  • Cloud products: JRR-CloudHeight_v2r3_j01_s202112250807275_e202112250808520_c202112250837300.nc

  • Aerosol detection: JRR-ADP_v2r3_j01_s202112250807275_e202112250808520_c202112250839550.nc

  • Aerosol optical depth: JRR-AOD_v2r3_j01_s202112250807275_e202112250808520_c202112250839550.nc

  • Surface reflectance: SurfRefl_v1r1_j01_s202112250807275_e202112250808520_c202112250845080.nc

  • Land Surface Temperature: LST_v2r0_npp_s202307241724558_e202307241726200_c202307241854058.nc

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')
scene.load(['smoke_concentration'])

Note

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]
available_datasets(configured_datasets=None)[source]

Get information of available datasets in this file.

Parameters:

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.

Returns:

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')}
_scale_data()[source]
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]