PyTorch implementation of "Integration of Snapshot and Time Series Data for Improving SMAP Soil Moisture Downscaling"
Abstract: Understanding soil moisture (SM) dynamics is crucial for environmental and agricultural applications. While satellite-based SM products provide extensive coverage, their coarse spatial resolution often fails to capture local SM variability. This study presents multi-modal network (MMNet) that integrates snapshot and time series data to downscale Soil Moisture Active Passive (SMAP) Level 4 surface SM. Specifically, the model takes multiple publicly available datasets as input: snapshot data includes optical imagery, Synthetic Aperture Radar (SAR) imagery, terrain attributes, landcover information, and soil properties, and time series data incorporates antecedent weather and land surface temperature (LST) collected over the preceding days. In-situ surface (0-5 cm) SM measurements from the Soil Climate Analysis Network (SCAN) and the United States Climate Reference Network (USCRN) were used as ground truth. We evaluated MMNet under three scenarios: on-site, off-site, and cross-region, and compared its performance with models that utilize either snapshot (Multilayer Perceptron – MLP) or time series (Transformer) data. The results showed that: 1) MMNet trained with on-site data provided accurate SM estimates over time in withheld years; 2) MMNet demonstrated spatial transferability, capturing SM dynamics in regions with sparse or no in-situ measurements; 3) the integration of snapshot and time series data was crucial for maintaining the model’s accuracy and generalizability across diverse scenarios. The downscaled SM maps demonstrated its potential for producing high-resolution temporally and spatially continuous SM estimates, which could further support a broad range of environmental and agricultural applications.
- Pytorch 3.8.12, PyTorch 1.11.0, and more in
environment.yml
Setup conda environment and activate
conda env create -f environment.yml
conda activate py38- Download in-situ data: Visit the International Soil Moisture Network (ISMN) and download in-situ SM data for stations and years of your interest.
- Download input dadasets: Use the provided Google Earth Engine script
gee_download.jsto export datasets used in this study. - Preprocess input datasets: Run the three scripts in the
preprocessing/in order to organize the raw data into model-ready format:
python preprocessing/1. merge_multi_csv.py
python preprocessing/2. data_cleaning.py
python preprocessing/3. make_time_series.pyexp-1: cross year scenario - train on previous 3 years, test on 1 year (It will run iterate through test years from 2019 to 2022)
python train_supervised_ts.py --model mmnet -e 1exp-1: if you want to specify training years
python train_supervised_ts.py --model mmnet -e 1 --target 2019exp-2: 5-fold validation by stations - train on 80% of stations, test on 20%. Results are reported at station-level (mean/median)
python train_supervised_ts.py --model mmnet -e 2exp-3: cross-region scenario - stations are divided into regions (W, M, E), train on two regions, test on the other. Results are reported at station-level.
python train_supervised_ts.py --model mmnet -e 3- save test prediction for result visualization
python train_supervised_ts.py --model mmnet -e 3 --save_predtrain_supervised_ts.pysupports modelstransformerandmmnet. For MLP results (default exp1, model-MLP):
python train_supervised.pySee results/ for optional post hoc interpretation.
In case you find MMNet or the code useful, please consider citing our paper using the following BibTex entry:
@article{Xu2025,
author = {Xu, Y. and Cai, S. and Huang, J. and Liu, J. and Shang, J. and Yang, Z. and Zhang, Z.},
title = {A Multimodal Deep Learning Approach for Soil Moisture Downscaling Using Remote Sensing and Weather Data},
journal = {Journal of Geophysical Research: Machine Learning and Computation},
year = {2025},
volume = {2},
number = {3},
pages = {e2025JH000639},
doi = {10.1029/2025JH000639},
url = {https://doi.org/10.1029/2025JH000639}
}
The in-situ data from SCAN and USCRN can be accessed from the International Soil Moisture Network (ISMN). All used input datasets can be accessed through the Google Earth Engine (GEE) platform:
- SMAP Level-4 (L4) Soil Moisture Product: Available at SPL4SMGP.007.
- Landsat-8 Data: Accessible via HLSL30 for potential integration with HLSS30.
- Sentinel-1 Data: Available at Sentinel-1 SAR GRD.
- Weather Variables (gridMET): Can be accessed from GRIDMET.
- MODIS Land Surface Temperature (LST): Available at MOD11A1.061.
- Terrain Attributes: Available at The U.S. Geological Survey (USGS) 3D Elevation Program (3DEP) dataset.
- Land Cover Data: The National Land Cover Dataset (NLCD) products can be downloaded from the USGS website and accessed on the GEE platform via NLCD 2019 and NLCD 2021.
- **Soil Properties **: Available from the POLARIS for direct download, and also accessible via the GEE platform following this link.
