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.

Terrestrial Laser Scanning

This notebook is designed to take terrestrial laser scanner (TLS) data from the SnowEx Alaska Campaigns and derive snow depth. The TLS data is provided in both a raw point cloud format and a processed DEM format. For this example, we will be focusing on the TLS DEMs.

The TLS data is available through the cloud on NSIDC and can be accessed using the earthaccess package. For this tutorial, we’ll use pre-selected data hosted on S3 for simplicity, which allows the notebook to run without authentication. We’ll also show you how to access the full dataset using earthaccess if you want to explore more data on your own.

The first example will involve a single TLS image for simplicity, then we will have a second example that examines multiple TLS scans from the campaigns.

The TLS data was gathered in Bonanza Creek near Fairbanks, AK in two months: October 2022 and March 2023. These months correspond to the snow-off and snow-on seasons, respectively. We will start by getting some sample snow-on TLS data from a single day.

Data Access

For this tutorial, we’ll stream data directly from an S3 bucket, which doesn’t require authentication. If you want to access the full dataset from NSIDC using earthaccess, see the section at the end of this notebook.

✓ S3 URLs configured for streaming TLS data

Because the TLS data is available on-demand through the cloud, we do not need to download it. Instead, we can stream it directly with rioxarray!

455
<Figure size 640x480 with 2 Axes>

Two things are noticeable from this TLS data:

  1. It has a very high resolution (0.15 m).

  2. The signal attenutates after ~60 m, so we have a small field of view.

This suggests that we will be able to obtain very fine-scale measurements of snow depth, but we will need scans from multiple locations to better characterize snow in Bonanza Creek.

In any case, let’s grab the snow-off data from the same location, and try to derive snow depth.

<Figure size 640x480 with 2 Axes>

Although the snow-on/-off data look similar to each other, there are slight differences, meaning that we cannot perform a difference right away. We must first interpolate the data, ensuring that fill values are accounted for, then perform the difference.

<Figure size 640x480 with 2 Axes>

Although not perfect, this provides a very reasonable snow depth DEM for the TLS data gathered in this location. If we want, we can perform basic statistics on the derived snow depths.

<Figure size 640x480 with 1 Axes>

Multiple Scans Example

For the multiple scans example, we’ll work with data from several sites across Bonanza Creek. The files are pre-selected and hosted on S3 for convenient streaming without authentication.

Found 9 snow-on files
Found 9 snow-off files
Loaded 9 snow-on rasters
Loaded 9 snow-off rasters

To make the final plot of this example cleaner, we will assign each TLS scan a label based on the site ID at Bonanza Creek.

Snow-on site IDs: ['CRS1', 'CRS2', 'CRS3', 'CRS4', 'CRS5', 'CRS6', 'CRS7', 'DEC', 'CRE']
Snow-off site IDs: ['CRS1', 'CRS2', 'CRS3', 'CRS4', 'CRS5', 'CRS6', 'CRS7', 'DEC', 'CRE']

Now each TLS scan is linked to a site ID. However, we can see that the snow-on data has many more scans than the snow-off data. Because snow depth data is our priority, we will only consider snow-on scans that share a site ID with the snow-off data.

Common site IDs: ['CRE', 'CRS1', 'CRS2', 'CRS3', 'CRS4', 'CRS5', 'CRS6', 'CRS7', 'DEC']

Now that the site IDs are matched, deriving snow depth is the same as the first example, only with looping to make the calculation (and plotting) easier.

<Figure size 1200x1200 with 18 Axes>

That’s all there is to it! Some of the coverage is a bit sparse, and the depths over some sites look variable, but we have reasonable snow depths over 9 sites in Bonanza Creek. These could then be compared to other ground based efforts or airborne data to cross-calibrate observation methods.

Working with the Full Dataset Using earthaccess

This tutorial uses a subset of TLS data hosted on S3 for convenience and to avoid authentication requirements in automated builds. If you want to access the complete dataset from NSIDC or explore additional dates and locations, you can use the earthaccess package.

Installation

First, install earthaccess if you haven’t already:

pip install earthaccess

or

conda install -c conda-forge earthaccess

Authentication and Data Access

import earthaccess

# Authenticate with NASA Earthdata Login
# On first use, you'll be prompted for your Earthdata credentials
# or you can set EARTHDATA_USERNAME and EARTHDATA_PASSWORD environment variables
auth = earthaccess.login(strategy="interactive")

# Search for TLS data by DOI and date range
results = earthaccess.search_data(
    doi="10.5067/R466GRXNA61S",  # SnowEx 2023 Bonanza Creek TLS dataset
    temporal=('2022-10-01', '2023-03-31'),  # Full campaign period
)

print(f"Found {len(results)} granules")

# Option 1: Stream data directly (no download needed)
files = earthaccess.open(results)
snow_data = rxr.open_rasterio(files[0])

# Option 2: Download data locally
downloaded_files = earthaccess.download(results, "./data")

Key Points

  • Authentication: You’ll need a free NASA Earthdata Login account (register at https://urs.earthdata.nasa.gov/)

  • Strategy options:

    • strategy="interactive" - Best for local development, prompts for credentials

    • strategy="environment" - Reads credentials from environment variables (good for automated workflows)

  • Data streaming: earthaccess.open() allows you to work with data without downloading

  • Search options: You can filter by temporal range, bounding box, and other parameters

Dataset Information

  • Dataset: SnowEx 2023 Bonanza Creek Terrestrial Laser Scanning (TLS)

  • DOI: 10.5067/R466GRXNA61S

  • NSIDC Page: https://nsidc.org/data/snex23_bcef_tls

  • Temporal Coverage: October 2022 (snow-off) and March 2023 (snow-on)

  • Spatial Coverage: Bonanza Creek Experimental Forest, Alaska

  • Sites: Cross-section transects (CRS1-20), control sites (DEC, CRE, SPR)

For more information about the earthaccess package, visit: https://earthaccess.readthedocs.io/