Install
openclaw skills install @ruiduobao/modis-lst-downloadSearch and download MODIS Land Surface Temperature (LST) products from NASA LAADS DAAC. Supports MOD11A1 (daily 1km), MOD11A2 (8-day 1km), MYD11A1, and MYD11A2 from Terra and Aqua satellites. Outputs GeoTIFF format.
openclaw skills install @ruiduobao/modis-lst-downloadSearch and download MODIS LST products from NASA LAADS DAAC with Earthdata authentication.
MODIS Land Surface Temperature (LST) products provide per-pixel land surface temperature with 1km spatial resolution. This skill supports both Terra (MOD) and Aqua (MYD) satellite products at daily and 8-day composite intervals.
| Product | Satellite | Temporal | Resolution |
|---|---|---|---|
| MOD11A1 | Terra | Daily | 1km |
| MOD11A2 | Terra | 8-day | 1km |
| MYD11A1 | Aqua | Daily | 1km |
| MYD11A2 | Aqua | 8-day | 1km |
NASA Earthdata requires a free account. To configure:
export EARTHDATA_USERNAME="your_username"
export EARTHDATA_PASSWORD="your_password"
python scripts\modis_lst_download.py configure --username your_username
# Search for available LST data
python scripts\modis_lst_download.py search \
--product MOD11A1 \
--start 2023-06-01 --end 2023-06-30 \
--bbox 116.0 39.5 116.8 40.2
# Download daily LST (requires Earthdata auth)
python scripts\modis_lst_download.py download \
--product MOD11A1 \
--start 2023-07-01 --end 2023-07-01 \
--bbox 116.0 39.5 116.8 40.2 \
--output ./lst_data/ --layers LST_Day_1km,QC_Day
# Download 8-day composite
python scripts\modis_lst_download.py download \
--product MOD11A2 \
--start 2023-07-01 --end 2023-07-08 \
--bbox 73 18 135 54 \
--output ./china_lst/
# List download URLs without downloading
python scripts\modis_lst_download.py download \
--product MYD11A1 \
--start 2023-08-01 --end 2023-08-01 \
--bbox 116.0 39.5 116.8 40.2 \
--list-only
--product: MOD11A1, MOD11A2, MYD11A1, or MYD11A2--start/--end: Date range (YYYY-MM-DD)--bbox: Bounding box as west south east north--output: Output directory--layers: Comma-separated layer names (LST_Day_1km, LST_Night_1km, QC_Day, QC_Night)--list-only: Only list download URLs, do not download--username: Earthdata username (or set EARTHDATA_USERNAME env var)# Install dependencies
pip install requests>=2.28.0 tqdm
# Or install from requirements.txt
pip install -r scripts/requirements.txt
@misc{wan2015mod11a2,
title={MOD11A2 MODIS/Terra Land Surface Temperature/Emissivity 8-Day L3 Global 1km SIN Grid V006},
author={Wan, Z. and Hook, S. and Hulley, G.},
journal={NASA EOSDIS Land Processes DAAC},
year={2015},
doi={10.5067/MODIS/MOD11A2.006}
}
0.02 to get temperature in KelvinT(°C) = DN × 0.02 - 273.1515000 → 300.00 K → 26.85°C| Bits | Field | Values |
|---|---|---|
| 0-1 | Quality flag | 0=good quality, 1=other quality, 2=cloud contaminated, 3=not produced |
| 2-3 | Emissivity error flag | 0=≤0.01, 1=≤0.02, 2=≤0.04, 3=>0.04 |
| 4-5 | LST error flag | 0=≤1K, 1=≤2K, 2=≤3K, 3=>3K |
Cloud filtering: Keep only pixels where bits 0-1 = 0 (good quality).
MOD11A2 composites daily LST values over 8 days using:
| Error | Cause | Solution |
|---|---|---|
ConnectionError | Network issue or API down | Check internet connection, retry in 1 minute |
HTTP 429 | Rate limit exceeded | Wait 60 seconds before retrying |
HTTP 404 | Invalid parameters or date range | Check parameter names and date format |
ValueError: bbox | Invalid bounding box | Ensure format is west,south,east,north |
| Empty output | No data for query region/time | Try different date range or check coordinates |
ModuleNotFoundError | Missing dependency | Run pip install requests tqdm |
401 Unauthorized | Earthdata auth failed | Check EARTHDATA_USERNAME/PASSWORD or run configure |
# Download every month for a year
for month in $(seq -w 1 12); do
python scripts\modis_lst_download.py download --product MOD11A1 --bbox 116 39.5 117 40.2 --start 2023-${month}-01 --end 2023-${month}-28 --output lst_2023_${month}.tif
sleep 2
done
# .github/workflows/update-modis-lst.yml
name: Update MODIS LST
on:
schedule:
- cron: '0 12 * * *' # Daily
jobs:
download:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install requests
- env:
EARTHDATA_USERNAME: ${{ secrets.EARTHDATA_USER }}
EARTHDATA_PASSWORD: ${{ secrets.EARTHDATA_PASS }}
run: |
python scripts\modis_lst_download.py download \
--product MOD11A1 --bbox 116 39.5 117 40.2 \
--start $(date -d '3 days ago' +%Y-%m-%d) \
--end $(date +%Y-%m-%d) \
--output data/lst_latest.tif
import rasterio
import numpy as np
with rasterio.open('lst.tif') as src:
raw = src.read(1)
# Convert DN to Celsius: scale factor 0.02, offset 273.15
lst_celsius = raw * 0.02 - 273.15
# QC: use QC band bits 0-1, keep only value 0 (good quality)
raster2pgsql -s 4326 -I -C lst.tif public.lst_raster | psql -d gis_db
--list-only first to preview URLs, then download in parallelsleep 2 between requests to avoid NASA rate limits从 NASA LAADS DAAC 搜索和下载 MODIS 地表温度(LST)产品。支持 Terra 和 Aqua 卫星的逐日和 8 天合成产品。
| 产品 | 卫星 | 时间分辨率 | 空间分辨率 |
|---|---|---|---|
| MOD11A1 | Terra | 逐日 | 1km |
| MOD11A2 | Terra | 8天合成 | 1km |
| MYD11A1 | Aqua | 逐日 | 1km |
| MYD11A2 | Aqua | 8天合成 | 1km |
NASA Earthdata 需要免费账号。配置方法:
set EARTHDATA_USERNAME=your_username
set EARTHDATA_PASSWORD=your_password
python scripts\modis_lst_download.py configure --username your_username
# 搜索可用 LST 数据
python scripts\modis_lst_download.py search \
--product MOD11A1 \
--start 2023-06-01 --end 2023-06-30 \
--bbox 116.0 39.5 116.8 40.2
# 下载逐日 LST(需要 Earthdata 认证)
python scripts\modis_lst_download.py download \
--product MOD11A1 \
--start 2023-07-01 --end 2023-07-01 \
--bbox 116.0 39.5 116.8 40.2 \
--output ./lst_data/ --layers LST_Day_1km,QC_Day
# 下载 8 天合成产品
python scripts\modis_lst_download.py download \
--product MOD11A2 \
--start 2023-07-01 --end 2023-07-08 \
--bbox 73 18 135 54 \
--output ./china_lst/
# 仅列出下载 URL 不下载
python scripts\modis_lst_download.py download \
--product MYD11A1 \
--start 2023-08-01 --end 2023-08-01 \
--bbox 116.0 39.5 116.8 40.2 \
--list-only