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.

Search and Download AVIRIS-3 Granules for a Study Area

Overview

During the AVUELO campaign in February 2025, AVIRIS-3 flew several flight lines over Panama and Costa Rica. Many flight lines overlap, and each flight line is cut into many scenes. A study area is often covered by several scenes from different days, flight altitudes, and pixel sizes. Each scene is about 1 GB. We should identify the right scenes before downloading.

In this tutorial, we use the outline of a plot in Panama as the study area polygon. We will:

  1. search for AVIRIS-3 granules over the polygon with NASA Earthdata Search and with earthaccess

  2. find the pixel size of each scene and how much of the study area it actually covers, without downloading the files

  3. download the selected granules with Earthdata Search and with Python

Requirements

AVUELO Datasets

The AVUELO datasets published so far are listed on the AVUELO data access page.

DatasetShort nameDOI
AVUELO AVIRIS-3 Orthocorrected Surface Reflectance (provisional calibration)AVUELO_AV3_L2A_Reflectance_2479Brodrick et al. (2025)

Import Libraries

Study Area Polygon

The file data/avuelo_forest_plots.geojson contains approximate outlines of the nine forest plots in the AVUELO tree crown dataset. Each outline is made by drawing the smallest rectangle around the mapped tree crowns of the plot. Any polygon file that geopandas can read (GeoJSON, shapefile, KML, GeoPackage) should work the same way.

Loading...

We plot the above geopandas dataframe as a map.

Loading...

We select the BCI 50-ha plot as our study area. Also, we plot the study area below.

Loading...

Step 1. Open the AVUELO AVIRIS-3 reflectance granules in Earthdata Search: https://search.earthdata.nasa.gov/search/granules?p=C3906206748-ORNL_CLOUD

Step 2. Spatial filter: click the spatial search icon in the search bar and choose File (KML, KMZ, ESRI, …). Upload data/avuelo_forest_plots.geojson. Click the BCI 50-ha plot polygon on the map to use it as the filter.

Earthdata Spatial Search for AVUELO

Step 3. Granule filter: click Filter Granules and type *RFL_ORT.nc in the Granule ID(s) box to keep only the reflectance files. Use *UNC_ORT.nc for the uncertainty files.

Earthdata Spatial Granule Search for AVUELO

Step 4. Click a granule in the list to see its file name and size, and its footprint on the map.

Step 5. Click Download All, then Edit Options. Choose Direct Download and click Download Data.

Step 6. On the download status page, there are several ways to download the files, including using Earthdata Download, a free desktop application.

Part 2: Search with earthaccess

Authentication

earthaccess.login() authenticates with your Earthdata Login credentials. If you have a .netrc file or EARTHDATA_USERNAME and EARTHDATA_PASSWORD environment variables, login completes without a prompt. Searching does not require login, but streaming and downloading data do.

Search granules with the polygon

NASA CMR (the meatadata catalog behind Earthdata Search) needs polygon vertices in counter-clockwise order, and it limits the number of vertices. We orient the polygon counter-clockwise with shapely and simplify it if it has many vertices.

Next, we search for the AVUELO AVIRIS-3 reflectance(Shortname: AVUELO_AV3_L2A_Reflectance_2479) granules within the spatial limit of the coords above. Each scene in the AVUELO reflectance dataset has two files, and each file is a separate granule in CMR:

ProductContents
RFL_ORTOrthorectified surface reflectance, aerosol optical thickness, and water vapor
UNC_ORTReflectance uncertainty (one standard deviation)
[(-79.845917, 9.155506), (-79.855225, 9.155857), (-79.855406, 9.151131), (-79.846098, 9.150779), (-79.845917, 9.155506)]
Granules found: 38

earthaccess.search_data() takes other filters too. For example, granule_name filters by file name with wildcards (* matches any characters). Here we keep only the reflectance files (RFL_ORT).

Reflectance granules found: 19

Granule metadata

We put the granule metadata in a geopandas dataframe. The flight line and scene number come from the file name.

Loading...

We plot the above dataframe and look at how they overlaps our study area BCI 50-ha plot.

Loading...

As we see above, the study area is overlaps several flight lines on different days. The rectangles on the map are the bounding boxes stored in CMR, which are often larger than the actual images. Some of these scenes may cover only a corner of the study area, or none of it.

Filter by pixel coverage

AVIRIS-3 flew at different altitudes, so the pixel size differs between flight lines. Most areas were collected at ~3 m and some sites at ~1 m. The pixel size is not in the CMR metadata, but we can read it from the file without downloading the whole file. earthaccess.open() opens a remote file, and xarray only reads the parts of the file.

Loading...
Loading...
Loading...
CRS: WGS 84 / UTM zone 17N (EPSG:32617)

The data files are projected to UTM 17N projection (EPSG: 32617).

To compute the coverage, we create a grid of points spaced 10 m apart within the study area and check how many points have valid data in each scene. The function below reads a single band water vapor (water_vapor) layer of each file, which is much smaller than the 284-band reflectance.

Loading...

The above table shows that: (1) scenes have pixel sizes of 1.1 m or 3.3-3.4 m, depending on the flight altitude, and (2) several scenes cover the whole plot (100% coverage) while some scenes do not cover the plot at all (0% coverage).

Filter by cloud cover

Coverage is not the only criterion. Clouds and cloud shadows are common over Panama, and the provisional L2A product has no cloud mask. Looking at a true-color image of the study area is the quickest check. We read only three bands (red, green, blue) for the study area window for the scenes with >95% pixel coverage.

<Figure size 1400x800 with 4 Axes>

Of the four scenes, only one scene AV320250206t193402_006 covers all the pixels within the study area with no clouds..

Download Files

Each scene has a reflectance (RFL_ORT) and an uncertainty (UNC_ORT) granule. We search both granules for the selected scene by name and download them with earthaccess.download(). Files that already exist locally are skipped.

The AVUELO data are stored in Amazon Web Services (AWS) region us-west-2. When you run these notebooks on a computer in the same region, such as a cloud-hosted JupyterHub, earthaccess.open() instead of earthaccess.download() reads directly from S3, which is much faster than from a local computer.

AVUELO_AV3_L2A_Reflectance.AV320250206t193402_006_L2A_OE_5988d8f5_RFL_ORT.nc 993 MB
AVUELO_AV3_L2A_Reflectance.AV320250206t193402_006_L2A_OE_5988d8f5_UNC_ORT.nc 1070 MB
Loading...
Loading...
Loading...
[PosixPath('downloads/AV320250206t193402_006_L2A_OE_5988d8f5_RFL_ORT.nc'), PosixPath('downloads/AV320250206t193402_006_L2A_OE_5988d8f5_UNC_ORT.nc')]

Download many granules

The same function downloads a list of granules in parallel. Four parallel downloads (threads=4) are usually faster. For example, the cell below would download all reflectance and uncertainty granules that cover at least half of the study area. Check the total size before you download.

10 scenes, 20.5 GB (reflectance + uncertainty)

You can also save the links to a text file to download them later with wget or curl.

References
  1. Brodrick, P. G., Chlus, A. M., Eckert, R., Chapman, J. W., Eastwood, M., Geier, S., Lundeen, S. R., Olson-Duvall, W., Rios, L. M., Jensen, D. J., Bernas, M., Thompson, D. R., & Green, R. O. (2025). AVUELO AVIRIS-3 Orthocorrected Surface Reflectance (provisional calibration). ORNL Distributed Active Archive Center. 10.3334/ORNLDAAC/2479
  2. Arauz, F., Hernandez, M., Villarreal, P., Ramos, P., Agrazal, A., Perez, M., Demarsan, M., & Muller-Landau, H. C. (2026). AVUELO: Tropical Forest Crown Maps with Tree Species Names, Panama. ORNL Distributed Active Archive Center. 10.3334/ORNLDAAC/2517