This work serves as a proof-of-concept that InSAR products can be used to estimate total snow depth through Machine Learning. This repository contains the code used to generate all results in our paper "Advancing Terrestrial Snow Depth Monitoring with Machine Learning and L-band InSAR data: A Case Study Using SnowEx 2017 Data" (doi: https://doi.org/10.3389/frsen.2024.1481848).
This work uses dataset from the 2017 NASA SnowEx Campaign. The InSAR data is from NASA JPL's UAVSAR sensor, and the Lidar Depth is from ASO.
Software used | Link to the software | Hardware specifications | OS required |
---|---|---|---|
Python 3.11.5 | https://github.com/pyenv/pyenv | This code should work on any recent PC/Laptop | Linux (any), MacOS, Windows |
To use the codes in this repository, you need to have Python installed. There are several ways to install Pyton. I will take you through how to install Python using the pyenv utility program. pyenv
allows you to install different versions of Python and to seamlessly switch between them.
Please follow the instructions here to install pyenv
for your operation system (OS).
Open the terminal and type the following commands to setup your virtual environment.
pyenv install 3.11.5
mkdir insar_project
cd insar_project
pyenv local 3.11.5
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pyenv
does not officially support Windows OS. Hence, you should install Python directly for your own version of Windows either by using the Microsoft Store or by navigating to https://www.python.org/downloads/windows/ in your browser and following the download link. During installation, be sure to check the box that adds Python to your PATH
environment variables. To run Python in a virtual environment, open the PowerShell program and type the follow commands.
mkdir insar_project
cd insar_project
python -m venv .venv
.venv/Scripts/activate
pip install --upgrade pip
If these instructions doesn't work for you (Windows users), you may need change the execution policy of your computer. To do this, run the PowerShell program as an administrator and run Set ExecutionPolicy Unrestricted
. Afterwards, exit and reopen the PowerShell program (not as an administrator) then type commands in 2.2.
Note: the Windows installation guide was not tested and the entire codebase was not tested on a Windows machine!
git clone git@github.com:cryogars/uavsar-lidar-ml-project.git
cd uavsar-lidar-ml-project
pip install .
Create the data folder using the command below.
mkdir data
-
Download the remote sensing dataset into the
data
folder using this link. -
Download the in situ data following these steps:
- Create the folder to put the in situ measurement and change directory:
mkdir data/SNOWEX cd data/SNOWEX
-
Dowlond the in situ measurement from NSIDC. When you land at the page navigate to
Data Access Tool
->Get Data
and clickDownload Script
. At the time of writing,Download Script
is on the botton right of the page and the downloaded script is namednsidc-download_SNEX17_SD.001_2025-01-07.py
. Note that you will need Earthdata username and password to download the in situ measurements. Click here to register. -
Run the Python script to download the in situ data using:
python nsidc-download_SNEX17_SD.001_2025-01-07.py
- Move back to the parent directory and run the codes. Note that you will need
Jupyter Notebook
installed.
cd ../..
After running the experiments, you can deactivate the virtual environment by running the command below.
deactivate
-
We would like to express our gratitude to the NASA Terrestrial Hydrology Program and all participants of the SnowEx campaign for providing the Lidar and in situ data.
-
We also thank Yunling Lou - the UAVSAR Project Manager at NASA JPL - for the UAVSAR data.
-
This work was partially funded by the U.S. Army Cold Regions Research and Engineering Laboratory (CRREL) under contract W913E523C0002.
We would appreciate citations if you use our code in your work.
@article{alabi5advancing,
title={Advancing Terrestrial Snow Depth Monitoring with Machine Learning and L-band InSAR Data: A Case Study Using SnowEx 2017 Data},
author={Alabi, Ibrahim Olalekan and Marshall, Hans-Peter and Mead, Jodi and Trujillo, Ernesto},
journal={Frontiers in Remote Sensing},
volume={5},
pages={1481848},
year={2025},
publisher={Frontiers},
doi={10.3389/frsen.2024.1481848}
}
Ibrahim Alabi (Email: ibrahimolalekana@u.boisestate.edu)