5. ECOSTRESS Files Concurrent with BioSCape#
5.1. BioSCape Data Skills Workshop: From the Field to the Image#
BioSCape, the Biodiversity Survey of the Cape, is NASA’s first biodiversity-focused airborne and field campaign that was conducted in South Africa in 2023. BioSCape’s primary objective is to study the structure, function, and composition of the region’s ecosystems, and how and why they are changing.
BioSCape’s airborne dataset is unprecedented, with AVIRIS-NG
, PRISM
, and HyTES
imaging spectrometers capturing spectral data across the UV, visible and infrared at high resolution and LVIS
acquiring coincident full-waveform lidar. BioSCape’s field dataset
is equally impressive, with 18 PI-led projects collecting data ranging from the diversity and phylogeny of plants, kelp and phytoplankton, eDNA, landscape acoustics, plant traits, blue carbon accounting, and more
This workshop will equip participants with the skills to find, subset, and visualize the various BioSCape field and airborne (imaging spectroscopy and full-waveform lidar) data sets. Participants will learn data skills through worked examples in terrestrial and aquatic ecosystems, including: wrangling lidar data, performing band math calculations, calculating spectral diversity metrics, machine learning and image classification, and mapping functional traits using partial least squares regression. The workshop format is a mix of expert talks and interactive coding notebooks and will be run through the BioSCape Cloud computing environment.
Date: October 9 - 11, 2024 Cape Town, South Africa
Host: NASA’s Oak Ridge National Laboratory Distributed Active Archive Center (ORNL DAAC), in close collaboration with BioSCape, the South African Environmental Observation Network (SAEON), the University of Wisconsin Madison (Phil Townsend), The Nature Conservancy (Glenn Moncrieff), the University of California Merced (Erin Hestir), the University of Cape Town (Jasper Slingsby), Jet Propulsion Laboratory (Kerry Cawse-Nicholson), and UNESCO.
Instructors:
In-person contributors: Anabelle Cardoso, Erin Hestir, Phil Townsend, Henry Frye, Glenn Moncrieff, Jasper Slingsby, Michele Thornton, Rupesh Shrestha
Virtual contributors: Kerry Cawse-Nicholson, Nico Stork, Kyle Kovach
Audience: This training is primarily intended for government natural resource management agency representatives and field technicians in South Africa, as well as local academics and students, especially those connected to the BioSCape Team.
5.2. Overview#
This tutorial will demonstrate how to discover ECOSTRESS data that is available from NASA Earthdata that are concurrent with the temporal range of the BioSCape Campaign.
5.2.1. Learning Objectives#
Using the Python
earthaccess
library to programmatically search and discover granules of ECOSTRESS data concurrent with the BioSCape airborne and field campaign.
5.2.2. Load Python Modules#
import rioxarray as rxr
import hvplot.xarray
import earthaccess
from glob import glob
5.2.3. Earthdata: ECOSTRESS Tiled Land Surface Temperature and Emissivity#
ECOSTRESS Tiled Land Surface Temperature and Emissivity Instantaneous L2 Global 70 m V002
There are over 4.5 Million
granules in this collection
earthaccess
Using the bounds of a BioSCape PRISM scene for the spatial extent of ECOSTRESS search
Using the date the PRISM scene was acquired for the temporal extent of the ECOSTRESS search
# start/end dates
temporal = ("2023-11-10", "2023-11-20")
# bounds of a BioSCape PRISM scene found at /shared/users/mthornton/BioSCape_workshop_sa/PRISM/prism_rgb_gordonsbay.tif
# lower_left_lon, lower_left_lat, upper_right_lon, upper_right_lat
bounds = (18.745473042, -34.229074023, 18.929915660, -34.104690291)
# doi of ECOSTRESS Tiled Land Surface Temperature and Emissivity
# Instantaneous L2 Global 70 m V002
doi = "10.5067/ECOSTRESS/ECO_L2T_LSTE.002"
granules = earthaccess.search_data(
count=-1, # needed to retrieve all granules
doi=doi,
temporal=temporal, # Bioscape campaign dates
bounding_box = bounds
)
Granules found: 11
# print one granule
granules[4]
Data: ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_water.tifECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_cloud.tifECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_view_zenith.tifECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_height.tifECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_QC.tifECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_LST.tifECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_LST_err.tifECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_EmisWB.tif
Size: 17.45 MB
Cloud Hosted: True
5.2.4. RECALL: We’ve already created a persistent earthdata login#
# earthaccess login
earthaccess.login(strategy="interactive", persist=True)
# download files
earthaccess.download(granules[4], "downloads")
Getting 1 granules, approx download size: 0.02 GB
Accessing cloud dataset using dataset endpoint credentials: https://data.lpdaac.earthdatacloud.nasa.gov/s3credentials
Downloaded: downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_water.tif
Downloaded: downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_cloud.tif
Downloaded: downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_view_zenith.tif
Downloaded: downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_height.tif
Downloaded: downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_QC.tif
Downloaded: downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_LST.tif
Downloaded: downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_LST_err.tif
Downloaded: downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_EmisWB.tif
[PosixPath('downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_water.tif'),
PosixPath('downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_cloud.tif'),
PosixPath('downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_view_zenith.tif'),
PosixPath('downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_height.tif'),
PosixPath('downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_QC.tif'),
PosixPath('downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_LST.tif'),
PosixPath('downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_LST_err.tif'),
PosixPath('downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_EmisWB.tif')]
# finding LST file
LST_f = glob("downloads/ECO*LST.tif")[0]
LST_f
'downloads/ECOv002_L2T_LSTE_30360_029_34HBH_20231113T134454_0712_02_LST.tif'
# open LST file
ds = rxr.open_rasterio(LST_f, chunked=True, masked=True).squeeze('band', drop=True)
ds
<xarray.DataArray (y: 1568, x: 1568)> Size: 10MB [2458624 values with dtype=float32] Coordinates: * x (x) float64 13kB 2e+05 2.001e+05 ... 3.096e+05 3.097e+05 * y (y) float64 13kB 6.3e+06 6.3e+06 6.3e+06 ... 6.19e+06 6.19e+06 spatial_ref int64 8B 0 Attributes: AREA_OR_POINT: Area scale_factor: 1.0 add_offset: 0.0
# plot LST
ds.hvplot.image(x='x', y='y', cmap='YlOrRd', crs=ds.rio.crs)