NOAA Center for Satellite Applications and Research banner
 
National Oceanic & Atmospheric Administration website NOAA Center for Satellite Applications and Research website

STAR / SMCD / VIIRS Aerosol Calibration and Validation

Python Scripts for VIIRS Aerosol Optical Depth (AOD) Gridded (Level 3) Data Files

The Aerosol Cal/Val Team provides Python scripts to work with VIIRS AOD gridded (Level 3) data files.

Download Operational VIIRS AOD Gridded Data Files

The Python script to download operational VIIRS AOD gridded data files will access the STAR online archive and download operational VIIRS AOD gridded data files for the observation period entered by the user.

Operational VIIRS AOD gridded data file characteristics:

  • Free & open access
  • Files in netCDF4 format (.nc)
  • High quality AOD, global coverage
  • Latency of one day
  • SNPP data availability:
    • Daily files: October 29, 2022-present (0.10° or 0.25° resolution)
    • Monthly-averaged files: November 2022-present (0.25° resolution)
  • NOAA-20 data availability:
    • Daily files: October 29, 2022-present (0.10° or 0.25° resolution)
    • Monthly-averaged files: November 2022-present (0.25° resolution)

Download Reprocessed VIIRS AOD Gridded Data Files

The Python script to download reprocessed VIIRS AOD gridded data files will access the JPSS data archive on Amazon Web Services (AWS) and download reprocessed VIIRS AOD gridded data files for the observation period entered by the user.

Reprocessed VIIRS AOD gridded data file characteristics:

  • Free & open access
  • An AWS cloud computing account is NOT required!
  • Files in netCDF4 format (.nc)
  • High quality AOD, global coverage
  • SNPP data availability:
    • Daily files: January 19, 2012 - December 31, 2020 (0.05°, 0.10° or 0.25° resolution)
    • Weekly-averaged files: Week 03, 2012 - Week 52, 2020 (0.25° resolution)
    • Monthly-averaged files: January 2012 - December 2020 (0.25° resolution)
  • NOAA-20 data availability:
    • Daily files: January 1, 2018 - December 31, 2020 (0.05°, 0.10° or 0.25° resolution)
    • Weekly-averaged files: Week 01, 2018 - Week 52, 2020 (0.25° resolution)
    • Monthly-averaged files: January 2018 - December 2020 (0.25° resolution)

Visualize Global VIIRS Gridded AOD on a Map

The Python script to visualize global VIIRS gridded AOD on a map will open a VIIRS AOD gridded data file in netCDF4 (.nc) format and plot AOD on a global map, along with the global AOD max, min, and mean, using the "Plate Carree" equidistant cylindrical projection with the equator as the standard parallel. The script can accommodate any operational or reprocessed VIIRS AOD gridded data files, including daily, weekly-, or monthly-averaged files, at 0.05°, 0.10°, or 0.25° resolution.

Below are examples of maps of NOAA-20 VIIRS gridded AOD made using the provided Python script: daily operational data at 0.10° resolution for July 17, 2023 (top) and monthly-averaged operational data at 0.25° resolution for July 2023 (bottom) (click on images to open full size versions in a separate tab).

NOAA-20 VIIRS global daily AOD image for 17 Jul 2023

NOAA-20 VIIRS global monthly AOD image for July 2023

Download

Version History

Version 3.0: Released 08/30/2023

  • Scripts updated to reflect new STAR data archive URLs and new nameing convention for operational files
  • New features:
    • Separate script to download reprocessed files
    • Python "satellite_aerosol.yml" configuration file is provided (contains versions of Python & required packages needed to run scripts)

Version 2.0: Released 05/19/2022

  • Scripts updated to include user-friendly input prompts, error checks, and other performance enhancements
  • Data files now downloaded from STAR archive via https://www URLs instead of depreciated ftp://ftp URLs

Version 1.0: Released 07/20/2021

  • Initial release


Requirements

The scripts were written in Python version 3.9, and can be run on Windows, MacOS, and Linux operating systems.

To run the scripts, several packages are required that are not part of the standard Anaconda installation, including S3Fs, cartopy, and netCDF4. The scripts will automatically check if required packages are installed on the user’s computer. If any packages are missing, the user will be notified.

We recommend users create a Python conda environment using the provided "satellite_aerosol.yml" configuration file. The "satellite_aerosol" environment contains the version of Python and the required packages needed to run the scripts, and its use will ensure the scripts run without errors.


Instructions for Scripts

Script to download operational VIIRS AOD gridded data files

Activate the "satellite_aerosol" environment and run the script. The user will be prompted to enter the:

  • Observation period start and end dates
  • Satellite (SNPP or NOAA-20 or both)
  • Data averaging time (daily or monthly)
  • Data resolution (0.10° or 0.25°)
  • Name of the directory where downloaded files will be saved

Automatic error checks will ensure entered information is valid; if there are any errors, the user will be prompted to re-enter the information. Once all entered values are valid, the script will check the STAR online archive for VIIRS files matching the specified parameters. Available files will be listed, along with the dates for which no files are available (if any); the user will be asked if they would like to download available files to the specified directory: type “yes” or “no” when prompted and hit “Enter.” To stop the download while it is in progress, press the "control" and "c" keys.

Script to download reprocessed VIIRS AOD gridded data files

Activate the "satellite_aerosol" environment and run the script. The user will be prompted to enter the:

  • Observation period start and end dates
  • Satellite (SNPP or NOAA-20 or both)
  • Data averaging time (daily, weekly, or monthly)
  • Data resolution (0.05°, 0.10°, or 0.25°)
  • Name of the directory where downloaded files will be saved

Automatic error checks will ensure entered information is valid; if there are any errors, the user will be prompted to re-enter the information. Once all entered values are valid, the script will check the JPSS data archive on AWS for VIIRS files matching the specified parameters. The total number of files available and the approximate total size of the download will be listed; the user will be asked if they would like to download available files to the specified directory: type “yes” or “no” when prompted and hit “Enter.” To stop the download while it is in progress, press the "control" and "c" keys.

Script to visualize global VIIRS gridded AOD data on a map

The script can process one or more AOD data files, making one map for each file. If processing multiple AOD data files, put all the files in the same directory.

Activate the "satellite_aerosol" environment and run the script. The user will be prompted to enter the:

  • Name of the directory where VIIRS AOD gridded data files are located
  • Name of the directory where map image files will be saved
  • Maximum AOD value for displaying data on the plot (1-5); AODs > this value up to 5 will be plotted, but represented by a single color (e.g., dark red)
  • Dots per inch (DPI) resolution of the map image files (100-900)
  • Format of the saved map image files (png, jpg, or pdf)

Automatic error checks will ensure entered information is valid; if there are any errors, the user will be prompted to re-enter the information. Once all entered values are valid, the script will gather all the VIIRS AOD gridded data files in netCDF4 (.nc) format in the specified directory. For each VIIRS AOD gridded data file, the script will make/save a map image file.


Contact

To report bugs, or if you have questions, please contact the author, Dr. Amy Huff.