How to download NOAA products using the NOAA class platform (example with VIIRS Active Fire) ?

Published: August 17, 2022

Updated: December 25, 2023

Tags: NOAA; Active Fire; CLASS WebSite;

DMCA.com Protection Status

Introduction

If you're interested in accessing and downloading NOAA products, then the NOAA Class platform is a great tool to use. In this guide, we'll walk you through how to download these products using the example of VIIRS Active Fire data (see NOAA JPSS Visible Infrared Imaging Radiometer Suite (VIIRS) Active Fires Environmental Data Record (EDR)

Register and login on the NOAA CLASS website

To register and login on the NOAA CLASS website, follow these steps:

Visit the NOAA CLASS Website (The Comprehensive Large Array-data Stewardship System (CLASS)) to access data ordering functionalities.

Step 1: Create an account by navigating to the "User Profile" section in the left sidebar.

How to get NOAA VIIRS Active Fires products ?
How to get NOAA VIIRS Active Fires products ?

Step 2: Proceed to log in.

How to get NOAA VIIRS Active Fires products ?
How to get NOAA VIIRS Active Fires products ?

Step 3: Order the desired data.

How to get NOAA VIIRS Active Fires products ?
How to get NOAA VIIRS Active Fires products ?

How to get NOAA VIIRS Active Fires products ?
How to get NOAA VIIRS Active Fires products ?

Step 4: Check your email for further instructions.

Retrieve data via FTP

To retrieve data via FTP, follow these steps:

Step 1: Check if FTP is installed. Open a terminal and enter the command:

ftp help

If you're using a Mac and encounter an error, install FTP using Homebrew. For example:

brew install inetutils

To install Homebrew on mac, run the following command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Step 2: Establish an FTP connection using the command line.

ftp ftp.avl.class.noaa.gov

simply enter "anonymous" as the username and leave the password field blank.

Step 3: Navigate to the directory that corresponds to your order (as provided in the email from NOAA CLASS). For instance:

ftp > cd 297076/8228057743

Step 4: Display all files using the 'nlist' command:

ftp > nlist

Step 5: Since the files are stored in a .tar archive, switch the FTP transfer mode to binary:

ftp > binary

Step 6: To disable prompt validation messages and avoid confirmation for each downloaded file, enter:

ftp > prompt

Step 7: Retrieve a single file:

get filename.tar

Retrieve all files in a directory:

mget -i *.tar .

Task completed.

Step 8: Exit the FTP session:

ftp > quit

Extract the contents of a single tar archive

To extract the contents of a single tar archive, use the command:

tar -xf filename.tar

To extract the contents of multiple tar archive files, you can use the following loop:

for FILE in *; do tar -xf $FILE; done

These commands will help you efficiently untar your files while preserving their original meaning. After extracting the files, you can then use Python to process and analyze the data further.

Troubleshooting

I encountered an issue while trying to check for the existence of files in a directory while connecting to class via FTP for certain orders. When I attempted to use the "nlist" command, I received an error message stating "Can't check for file existence" and the connection timed out.

ftp> nlist
200 PORT command successful
425 Could not open data connection to port 56731: Connection timed out

Additionally, I was unable to download the files using the "mget" command. After waiting for some time, nothing seemed to happen.

ftp> mget -i *.h5 .
Can't check for file existence
Can't check for file existence

To resolve this issue, I found a solution by connecting to the FTP server using the "-p" option, like this (see Can't connect to FTP server: 425 Unable to build data connection: Connection timed out):

ftp -p ftp.avl.class.noaa.gov

This approach successfully resolved the problem and allowed me to check for file existence and download the necessary files.

Image

of