Download granules using Direct Download Access script from NASA Earthdata Search

NASA Earthdata Search is a map-based interface that enables users to download Earth Science data through various methods, including Direct Download. This option allows users to download all data associated with the selected granules, and the requested data will be available for download immediately. To access the files, users can use the download access script provided by Earthdata Search. This is a convenient way to download a large number of granules. 

This article will use the Global Glacier Debris Thickness Estimates and Sub-Debris Melt Factors (HMA_DTE) data set to demonstrate the Direct Download Access script. 

Accessing this dataset has been problematic using the Python download script from the Data Access Tool and the HTTP data access option via the browser. However, we found that using the direct download access script reliably avoids these issues. We recommend using it until we can fix the issues with the other access methods.

 

Please note that the script works on Linux, Mac, and Windows operating systems. For Windows PCs, users will need to install a program that emulates a Unix-like command line utility, such as Cygwin. 

Step 1: Search for a data set 

Users can access the NASA Earthdata Search interface through their browser by visiting https://search.earthdata.nasa.gov.  

Simply search for "HMA_DTE" in the search box. 

Earthdata Search screenshot of searching HMA_DTE dataset

Step 2: Refine search results 

Users can refine their search results by applying temporal and spatial filters, or by using wildcards to filter by filenames. 

The filename of HMA_DTE granules includes regional information. Specifically, in HMA_DTE_XY.ZZZZZ.ext, XY indicates the RGI region, and X is used for regions 10 and higher. For example, to search for all granules in Region 1 of HMA_DTE, use *_1.* in the Granule ID(s) search box. 

Earthdata Search screenshot of using text wildcard to search for regional granules

Once you have refined your search and are satisfied with the results, click on "Download All". 

Step 3: Select the Direct Download option 

Select "Direct Download" as the data access method and click the "Download Data" button. 

Earthdata Search screenshot of selecting direct download access method

Step 4: Download the Earthdata shell script 

Once the download status shows "Complete," click on the "Download Script" tab and then click the "Save" button to download the shell script. 

Earthdata Search screenshot of saving download access script

Step 5: Run the script 

After downloading the script, open Terminal on Linux or Mac, or Cygwin (or a similar utility) on Windows. Navigate to the folder that contains your script. If you would like your files to be downloaded to a specific folder, move the script to that folder, as the files will be downloaded to the folder where the script is located. 

Next, make the script executable by running the following command: chmod 777 download.sh

Now run the script by typing the following command in the command line: ./download.sh. Be sure to include the leading period and forward slash, as they are required. 

Step 6: Enter Earthdata Login credentials 

The script will prompt you to enter your Earthdata Login credentials. Enter your username and password. Note that you will not be able to see your password as you type it. 

The download should start soon. You will see the download status for each link present in the download access script, and files will start downloading to your computer. The script will terminate once it has attempted to download all the files specified in the script.