Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Direct S3 Access GEDI L4A from the NASA Earthdata Cloud

GEDI L4A Datasets are available through NASA’s Earthdata Cloud. In this tutorial, we will retrieve Global Ecosystem Dynamics Investigation (GEDI) L4A Footprint Level Aboveground Biomass Density (AGBD)Dubayah et al. (2022) dataset from the Earthdata Cloud using direct S3 access.

NASA Earthdata on Cloud is always free and accessible via either HTTPS or direct S3 bucket access. With direct S3 access, you can bring your “code to the data”, making your processing faster and scalable. Direct S3 access to NASA Earthdata on Cloud is only available if your Amazon Web Services (AWS) instance is set up in the us-west-2 region. If you are new to the Earthdata Cloud, these NASA Earthdata primers and tutorials are good resources to get you started.

You can access jupyter notebook within your own AWS EC2 instance. Alternatively, you can use Amazon SageMaker Studio Lab to run this jupyter notebook. SageMaker Studio Lab is a free service that gives access to AWS compute resources and direct S3 access to datasets in the NASA Earthdata Cloud through a JupyterLab environment.

Requirements

This tutorial should be run on the Cloud, such as a Jupyter Lab instance running in AWS us-west 2 region. Additional prerequisites for running this Jupyter notebook are provided here.

1. Polygonal Area of Interest

We will read an area within the Harvard Forests as a GeoJSON file. The Harvard Forests is one of the most extensively studied ecological sites in the United States.

If an area of interest is already defined as a polygon, the polygon file (geojson, shapefile, or kml) can be used to find overlapping GEDI L4A files. More details about this capability are described on this page.

Loading...

2. Searching GEDI L4A Files

We will use the earthaccess module to query spatially overlapping GEDI L4A granules.

Total granules found: 37

Let’s retrieve direct s3 links from the above earthaccess search_data results.

Now, the granule_arr contains a list of s3 granule links, starting with s3://. We can print the first two items of the granule_arr.

['s3://ornl-cumulus-prod-protected/gedi/GEDI_L4A_AGB_Density_V2_1/data/GEDI04_A_2019229131935_O03846_02_T03642_02_002_02_V002.h5', 's3://ornl-cumulus-prod-protected/gedi/GEDI_L4A_AGB_Density_V2_1/data/GEDI04_A_2019246121050_O04109_03_T04380_02_002_02_V002.h5']

Let’s plot the monthly number of granules overlapping the above area within the Harvard Forest.

<Figure size 640x480 with 1 Axes>

As we see in the figure above, over the Harvard Forest area, some months do not have overlapping GEDI granules while some months have up to four granules.

3. Direct S3 access

We recommend using earthaccess to download GEDI data granules from the NASA Earthdata. You will first need to authenticate your Earthdata Login (EDL) information using the earthaccess python library as follows:

For this tutorial, we will be retrieving the AGBD variables agbd and l4_quality_flag, in addition to the variables that provide geolocation (lat_lowestmode, lon_lowestmode, elev_lowestmode) and shot identifier (shot_number).

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

We will now plot the AGBD (mg/ha-1) values of the footprints on a map.

Loading...
References
  1. Dubayah, R. O., Armston, J., Kellner, J. R., Duncanson, L., Healey, S. P., Patterson, P. L., Hancock, S., Tang, H., Bruening, J., Hofton, M. A., Blair, J. B., & Luthcke, S. B. (2022). GEDI L4A Footprint Level Aboveground Biomass Density, Version 2.1. 10.3334/ORNLDAAC/2056