Accessing External Granule Data¶
It is possible to download granules hosted on external Distributed Active Archive Centers (DAACs) using the MAAP ADE. This data is hosted externally from the MAAP but can be accessed using the MAAP ADE’s authentication systems.
In order to do this, we start by creating a Jupyter workspace within the NASA Goddard Commercial Cloud (GCC) MAAP ADE. Using the left-hand navigation, select “+ Get Started” and then select the “Jupyter - MAAP Basic Stable” workspace.
Alternatively, you can create a workspace using the “Workspaces” interface. See Create Workspace for more information.
Accessing data from Jupyter Notebooks in your workspace¶
Within your Jupyter Notebook, start by importing the maap
package. Then invoke the MAAP, setting the maap_host
argument to api.ops.maap-project.org
.
[1]:
# import the maap package to handle queries
from maap.maap import MAAP
# invoke the MAAP using the MAAP host argument
maap = MAAP(maap_host='api.ops.maap-project.org')
External data access application approval¶
In order to access external DAAC data from the ADE, MAAP uses your Earthdata Login profile to send a data request to the desired DAAC application. For an example on how to grant access to an external DAAC, see this example on granting access to Goddard Earth Sciences Data and Information Services Center (GES DISC) from your Earthdata Login profile.
If Earthdata Login access is not granted to your target DAAC application, the following examples will result in a 401 permission error.
Accessing Sentinel-1 Granule Data from the Alaska Satellite Facility (ASF)¶
Search for a granule using the searchGranule
function (for more information on searching for granules, see Searching for Granules in MAAP). Then utilize the getData
function, which downloads granule data if it doesn’t already exist locally. We can use getData
to download the first result from our granule search into the file system and assign it to a variable (in this case download
).
[2]:
# search for granule data using the collection concept ID argument
results = maap.searchGranule(collection_concept_id='C1200231010-NASA_MAAP')
# download first result
download = results[0].getData()
We can then use the print
function to see the file name and directory.
[3]:
# print file directory
print(download)
./S1A_S3_GRDH_1SDH_20140615T034444_20140615T034512_001055_00107C_8977.zip
Accessing Global Ecosystem Dynamics Investigation (GEDI) Level 3 Granule Data from the Oak Ridge National Lab (ORNL)¶
We use a similar approach in order to access GEDI Level 3 granule data. Note that we can use searchGranule
’s cmr_host
argument to specify a CMR instance external to MAAP.
[4]:
# search for granule data using CMR host name, collection concept ID, and Granule UR arguments
results = maap.searchGranule(
cmr_host='cmr.earthdata.nasa.gov',
short_name='GEDI_L3_LandSurface_Metrics_V2_1952'),
# download first result
download_2 = results[0].getData()
As in the previous example, we can use the print
function to see the file name and directory.
[5]:
# print file directory
print(download_2)
./GEDI03_elev_lowestmode_stddev_2019108_2020106_001_08.tif