Direct Access to LPDAAC GEDI Products

Authors: Alex Mandel (Development Seed), Brian Freitag (NASA MSFC), Jamison French (Development Seed)

Description: In this tutorial, we demonstrate how to use transform HTTPS links into their corresponding S3 links to retrieve GEDI data hosted by the Land Processes Distributed Active Archive Center (LP DAAC).

This tutorial demonstrates a temporary workaround with the expectation that direct access links for LPDAAC GEDI data will eventually be available through NASA CMR.

Run This Notebook

To access and run this tutorial within MAAP’s Algorithm Development Environment (ADE), please refer to the “Getting started with the MAAP” section of our documentation.

Disclaimer: it is highly recommended to run a tutorial within MAAP’s ADE, which already includes packages specific to MAAP, such as maap-py. Running the tutorial outside of the MAAP ADE may lead to errors.

Additional Resources

Importing Packages

If the packages below are not installed already, uncomment the following cell

[ ]:
# %pip install h5py fsspec s3fs --quiet
import h5py
import boto3
import botocore
import fsspec
from maap.maap import MAAP

maap = MAAP(maap_host="")

Searching the Data

We’ll start by gathering a sample list of granules from the GEDI L2A collection. The HTTPS links we’re after are nested within the granule object.

results = maap.searchGranule(
    concept_id="C1908348134-LPDAAC_ECS",  # GEDI-L2A

# Download URL of GEDI L2A product

Converting the Paths

We’ll create a helper function to handle the link conversions to AWS S3 links.

def lpdaac_gedi_https_to_s3(url):
    dir_comps = url.split("/")
    return f"s3://lp-prod-protected/{dir_comps[6]}/{dir_comps[8].strip('.h5')}/{dir_comps[8]}"

# Sample

Accessing the Data

We’ll fetch temporary S3 credentials for LPDAAC data and then view the BEAM groups of the first GEDI link in our results.

credentials =

s3 = fsspec.filesystem(
with[0]._location), "rb") as f:
    gedi_data = h5py.File(f, "r")
<KeysViewHDF5 ['BEAM0000', 'BEAM0001', 'BEAM0010', 'BEAM0011', 'BEAM0101', 'BEAM0110', 'BEAM1000', 'BEAM1011', 'METADATA']>
[ ]: