2. NASAaccess Python Guide

Platform Version Downloads https://img.shields.io/readthedocs/nasaaccess?style=social

2.1. Prerequisites

On a local machine the user should have installed the following programs as well as setting up a user account with Earthdata. The list below gives a summary of what is needed to be done prior to work with NASAaccess software on any local machine:

  • Installing Anaconda or miniconda.

  • NASAaccess software needs a user registration access with Earthdata. Users should set up a registration account(s) with Earthdata login as well as well as authorizing NASA GES DISC data access. Please refer to https://disc.gsfc.nasa.gov/data-access for further details.

  • After registration with Earthdata NASAaccess software package users should create a reference file (.netrc) with Earthdata credentials stored in it to streamline the retrieval access to NASA servers.

    • Creating the .netrc file at the user machine Home directory and storing the user NASA GES DISC logging information in it is needed to execute the NASAaccess package commands. Accessing data at NASA servers is further explained at NASA earth data wiki. The manual steps for creating the .netrc file has been discussed in NASAaccess R package installation. The .netrc file should look like:

      netrc file layout

      Note

      In your .netrc file <uid> is your user name and <password> is your Earthdata Login password.

    • For Windows OS machines user the NASA GES DISC logging information should be saved in a file _netrc beside the .netrc file explained above. Define a HOME variable in your Environment Variables by picking any directory you want to be referenced as your HOME directory. In many machines HOME directory is already set to be your personal Documents folder (i.e., C:\Users\yourname\Documents). Store your netrc file(s) in your Documents or the specfied HOME directory.

2.2. NASAaccess Conda Package Installation

Installing the r-nasaaccess conda package is obtained by:

conda install -c conda-forge r-nasaaccess

2.3. Getting Started with the NASAaccess Conda package

The NASAaccess commands can be easily executed in the conda environment by writing the NASAaccess commands to a separate file (e.g., work.R) and running it by calling the Rscript executable in conda.

Rscript work.R

More examples on NASAaccess functionalities can be found Here.