Knowledge Base
2018 AGU Fall Meeting: NSIDC DAAC Hands-on Tutorial
Programmatic Access to Data with Filtering and Customization Services: Prerequisites and System Check
The prerequisites required for this tutorial include:
1. Earthdata Login registration
An Earthdata Login account is required to access data from the NSIDC DAAC. Please visit the Earthdata Login registration page to register for an account. Keep your username and password handy for the lessons in this tutorial.
2. curl installation
curl is a command line tool for getting or sending files using URL syntax. It supports a wide range of internet protocols including HTTPS, which is the data distribution protocol supported by the NSIDC DAAC. See the curl Documentation Overview page for more information. To install curl, visit the curl Download page. You may select the curl Download Wizard to be guided through their recommended download method, or you can choose from the list of packages sorted by operating system. If you are unsure whether or not you already have curl installed on your computer, follow these steps:
Mac OS X or Windows
From a Terminal or Command Prompt window (for Mac OS X or Windows, respectively), run the curl command:
curl
You should see help options displayed, indicating that curl is installed:
curl: try 'curl --help' or 'curl --manual' for more information
You can also check your curl version in a Terminal or Command Prompt window:
curl -V
The version information is displayed below:
curl 7.62.0 (x86_64-apple-darwin17.7.0) libcurl/7.62.0 OpenSSL/1.0.2q zlib/1.2.11
The most recent stable version is 7.62.0 but previous recent stable versions should also work for this exercise (curl 7.54.0 was tested and worked successfully, for example).
If you do not have curl or would like to upgrade your version, we recommend the following methods:
Mac OS X
Install Homebrew by pasting the following command in a Terminal window and following the script prompts. See the Homebrew documentation for more options required for OS X 10.8 Mountain Lion and below.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Once Homebrew is installed, paste the following command in a Terminal window to install curl with openSSL:
brew install curl --with-openssl
You can confirm your curl installation and version using the following commands:
brew search curl
This will display all partial or full matches. You should see a green check next to curl:
curl ✔
To find version information using Homebrew:
brew info curl
This will display your version of curl:
curl: stable 7.62.0 (bottled), HEAD [keg-only]
To upgrade to the latest curl using homebrew:
brew upgrade curl --with-openssl
This should only take a few seconds to upgrade to the latest version.
Windows
Visit the curl Windows Downloads page to download the appropriate package for your Windows configuration. Follow the installation instructions provided in the docs folder of the zip file. Alternatively, if you are a Cygwin user, you can install either the Cygiwn 64 bit or 32 bit curl package.
3. Transport Layer Security (TLS)
The Transport Layer Security (TLS) is a protocol needed to access SSL secure web pages. NASA Earthdata systems is removing support of TLSv1.1 on 6 December 2018, therefore TLSv1.2 is required to access NSIDC DAAC data.
In either Mac OSX or Windows, you can test whether or not you can connect to a web server that supports TLSv1.2 using the following curl command:
curl --max-time 3 -v -l --silent https://google.com/ --tlsv1.2
You should see a line starting with: * SSL connection using TLSv1.2
Alternatively, you use the following curl command:
curl --tlsv1.2 --silent https://www.howsmyssl.com/a/check
The end of the output string should include "tls_version":"TLS 1.2"
.
Curl relies on the underlying cryptographic library that it is built against for TLS support, e.g., OpenSSL, NSS, etc. It may also be helpful to check that your cryptographic library contains the Elliptic Curve Ciphers that NASA Earthdata supports:
ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES256-SHA384 ECDHE-RSA-AES128-SHA ECDHE-RSA-AES256-SHA
For Mac OS X users, you can run the following command to get a list of ciphers supported in your library, which should include the ciphers supported by NASA Earthdata:
openssl ciphers -v ALL | grep TLSv1.2 | awk '{print $1}' | sort -u