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.

Accessing GEDI L4A Dataset with NASA OPeNDAP in the Cloud

Overview

The Global Ecosystem Dynamics Investigation (GEDI) L4A Footprint Level Aboveground Biomass Density (AGBD)Dubayah et al. (2022) dataset provides predictions of the aboveground biomass density (AGBD; in Mg/ha) and estimates of the prediction standard error within each sampled geolocated GEDI footprint. GEDI L4A dataset is available for the period starting 2019-04-17 and covers 52 N to 52 S latitudes. GEDI L4A data files are natively in HDF5 format.

This tutorial will demonstrate how to directly access and subset the GEDI L4A dataset using NASA OPeNDAP Hyrax. Hyrax allows direct access to selected variables for the dataset within the spatial-temporal bounds without having to download the whole data files. We will compute the distribution of carbon stocks or AGBD for a protected area using the GEDI L4A dataset.

Requirements

Additional prerequisites are provided here.

Access to NASA OPeNDAP requires NASA Earthdata authentication. We recommend authenticating your Earthdata Login (EDL) information using the earthaccess python library as follows:

1. Search GEDI L4A granules

First, we will search for granules that overlay our area of interest. We will then access the location and science variables for the GEDI shots using OPeNDAP.

For this tutorial, we will use the boundary of Annapurna Conservation Area (ACA), the largest protected area of Nepal, to search for the overlapping GEDI L4A granules. The boundary polygon is available as a GeoJSON file at polygons/aca.json. Let’s plot the boundary polygon of the ACA over a basemap.

Loading...

We will now search for all the GEDI L4A granules overlapping the ACA boundary polygon using the Earthaccess Python library. We will also limit the period of our search to the year 2020 (Jan 1 to Dec 31, 2020). The earthaccess’s search_data allows searching dataset granules using NASA’s CMR API. It requires the dataset digital object identifier (DOI), time, and the polygon coordinates as tuples.

Total granules found: 60

Now, the GEDI L4A granule information, including data URLs, is stored in granule_arr, from which we can create OPeNDAP URLs. We will use NetCDF-4 encoding in the HTTP requests as an NC4 file representation. Let’s print the first three granules from the list.

2. Access the variables of interest for the subset area via OPeNDAP

Access to NASA OPeNDAP requires NASA Earthdata authentication. Please set up a new account if you do not already have a NASA Earthdata account. We will use earthaccess module to set up the authentication and return a session instance with an authorized bearer token.

OPeNDAP allows access to the dataset of interest, so you can only download the variables you are interested in and, by doing so, save the download bandwidth. We are interested in the following selected science variables for all the eight GEDI beams for this tutorial.

We will save the data retrieved from OPeNDAP into a pandas dataframe. Let’s first define the headers for the dataframe.

Now, we will retrieve the dataset from the OPeNDAP Hyrax server. We will use the following approach to access the dataset. First, we will access the geographic variables (lat_lowestmode, lon_lowestmode) of all the GEDI shots within the beam to identify the shots overlapping the area of interest. We will then retrieve the science variables of interest (agbd, agbd_t, etc.) for the area of interest.

The following step will take time to run. The figure below will update to indicate the files being downloaded.

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

We have saved the subset data for the GEDI shots within the ACA boundary l4a_gdf geopandas dataframe. Let’s print the first few rows.

Loading...

We can now plot the distribution of the AGBD by plant functional types (PFTs) for the good quality shots in the ACA region.

<Figure size 1500x500 with 1 Axes>

Let’s also plot how the AGBD is distributed across elevation ranges for different PFTs.

<Figure size 1512.22x500 with 3 Axes>

Hyrax in its current form has some limitations. It does not support the subsetting of a string array, so GEDI L4A variables such as predict_stratum can not be accessed using the approach described above.

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