Knowledge Base

V0 Programmatic Data Access Guide

Data from the NASA National Snow and Ice Data Center Distributed Active Archive Center (NSIDC DAAC) can be accessed directly from our HTTPS file system. We provide basic command line Wget and curl instructions for HTTPS file system downloads below. For questions about programmatic access to NSIDC DAAC data, please contact NSIDC User Services: nsidc@nsidc.org

Regardless of how users access data from the NSIDC DAAC, an Earthdata Login account is required. Please visit the Earthdata Login registration page to register for an account before getting started. 

Wget Instructions for Mac and Linux
Wget Instructions for Windows
curl Instructions

Wget Instructions for Mac and Linux

Step 1

Store your Earthdata Login credentials (username <uid> and password <password>) for authentication in a .netrc file in your home directory. 

Example commands showing how to set up a .netrc file for authentication:

echo 'machine urs.earthdata.nasa.gov login <uid> password <password>' >> ~/.netrc
chmod 0600 ~/.netrc

Replace <uid> and <password> with your Earthdata Login username and password (do not include brackets). Windows bash users should also replace the forward slash ( / ) with a backslash ( \ ) in the above commands. 

Step 1 may be skipped by specifying the following options in the Wget command in Step 2:
--http-user=<uid> --http-password=<password>
or
--http-user=<uid> --ask-password

Step 2

Use a Wget command to download your data. 

Example Wget command to download SMAP L4 Global Daily 9 km EASE-Grid Carbon Net Ecosystem Exchange, Version 4 data for 07 October 2019:

wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --keep-session-cookies --no-check-certificate --auth-no-challenge=on -r --reject "index.html*" -np -e robots=off https://n5eil01u.ecs.nsidc.org/SMAP/SPL4CMDL.004/2019.10.07/SMAP_L4_C_mdl_20191007T000000_Vv4040_001.h5

Requested files will be downloaded to a directory named after the HTTPS host, n5eil01u.ecs.nsidc.org. You can modify how the files are stored by specifying the following Wget options:
-nd (or --no-directories)
-nH (or --no-host-directories)

The GNU Wget 1.20 Manual provides more details on Wget options.


Wget Instructions for Windows

The following instructions apply to Wget executed through Windows Command Prompt. For Windows bash, please see the above Mac and Linux instructions. 

Step 1

Create a text file ("mycookies.txt") to store the website cookies returned from the HTTPS server. Store this in the wget installation directory.

Step 2

Use a Wget command to download your data. In the following example, replace <uid> and <password> with your Earthdata Login username and password (do not include brackets).

Example Wget command to download SMAP L4 Global Daily 9 km EASE-Grid Carbon Net Ecosystem Exchange, Version 4 data for 07 October 2019:

wget --http-user=<uid> --http-password=<password> --load-cookies mycookies.txt --save-cookies mycookies.txt --keep-session-cookies --no-check-certificate --auth-no-challenge -r --reject "index.html*" -np -e robots=off https://n5eil01u.ecs.nsidc.org/SMAP/SPL4CMDL.004/2019.10.07/SMAP_L4_C_mdl_20191007T000000_Vv4040_001.h5

Requested files will be downloaded to a directory named after the HTTPS host, "n5eil01u.ecs.nsidc.org". You can modify how the files are stored by specifying the following Wget options:
-nd (or --no-directories)
-nH (or --no-host-directories)

The GNU Wget 1.20 Manual provides more details on Wget options.


curl Instructions

Step 1 

Follow the Step 1 Wget instructions for Mac and Linux above. All Windows users should replace the forward slash ( / ) with a backslash ( \ ) in the same commands.

Step 2

Use a curl command to download your data. 

Example curl command to download a single file of SMAP L4 Global Daily 9 km EASE-Grid Carbon Net Ecosystem Exchange, Version 4 data for 07 October 2019:

curl -b ~/.urs_cookies -c ~/.urs_cookies -L -n -O https://n5eil01u.ecs.nsidc.org/SMAP/SPL4CMDL.004/2019.10.07/SMAP_L4_C_mdl_20191007T000000_Vv4040_001.h5

The -O option in the curl command downloads the file to the current working directory on your computer. 


Last updated: February 2020