Install
openclaw skills install @ruiduobao/geoskill-snowmelt-runoff-modeling度日因子法(DDF)融雪径流模拟,逐日累积融雪生成径流过程线与积雪面积曲线。Degree-day-factor snowmelt runoff modeling producing daily hydrograph and snow-cover depletion curve. 输出径流时序/积雪曲线 JSON + 径流深栅格。
openclaw skills install @ruiduobao/geoskill-snowmelt-runoff-modelingDegree-day-factor (DDF) snowmelt runoff modeling, suitable for spring snowmelt flood forecasting, water resource assessment, and snowmelt dynamics monitoring in high-elevation / high-latitude basins. Core equation:
M = DDF × max(0, T − T_base)
where M is the daily snowmelt (mm/day, as water equivalent), DDF is the degree-day factor (mm·°C⁻¹·day⁻¹), T is the daily mean air temperature, and T_base is the melt threshold temperature (default 0 °C).
The model laps the reference temperature down to each pixel using a temperature lapse rate (default 6 °C/km), so higher elevations are colder and snow melts more slowly. In the daily loop, the actual melt at each pixel is limited by its remaining snow water equivalent (SWE) (it cannot melt more than what is available), accumulating into a pixel-wise runoff depth raster; basin-wide averaging yields a daily runoff hydrograph, and a snow-cover depletion curve over time is also produced. The whole process conserves water: cumulative runoff = initial snowpack − residual snowpack.
A --synthetic mode is supported to generate a complete simulated dataset containing elevation zones (500–3000 m), a spring warming sequence, and initial snowpack distributed by elevation, so the workflow can be validated without network access or real data.
pip install numpy rasterio scipy
python geoskill-snowmelt-runoff-modeling.py --bbox 116.0 39.0 117.0 40.0 --ddf 4.0 --output-dir ./output
python geoskill-snowmelt-runoff-modeling.py \
--bbox 116.0 39.0 117.0 40.0 \
--ddf 4.0 \
--synthetic \
--output-dir ./snowmelt_syn
python geoskill-snowmelt-runoff-modeling.py --bbox 116 39 117 40 --ddf 2.0 --synthetic --output-dir ./ddf2 --quiet
python geoskill-snowmelt-runoff-modeling.py --bbox 116 39 117 40 --ddf 6.0 --synthetic --output-dir ./ddf6 --quiet
python geoskill-snowmelt-runoff-modeling.py \
--input dem.tif \
--ddf 4.0 \
--n-days 90 \
--output-dir ./real_snowmelt
(In real mode, the temperature time series and initial snowpack are synthesized from elevation, for workflow demonstration purposes.)
python geoskill-snowmelt-runoff-modeling.py \
--bbox 116 39 117 40 \
--ddf 4.0 --t-base 1.0 --n-days 60 \
--synthetic --output-dir ./tbase1
| File | Format | Description |
|---|---|---|
runoff_depth.tif | GeoTIFF (float32) | Cumulative snowmelt runoff depth (mm), EPSG:4326 |
runoff_time_series.json | JSON | Daily hydrograph, snow-cover depletion curve, cumulative runoff, temperature series, statistics |
output-manifest.json | JSON | Run manifest (input/output/QA/software versions) |
--synthetic mode reads no external dataMIT
度日因子法(Degree-Day Factor, DDF)融雪径流模拟,适用于高海拔/高纬度流域 春季融雪洪水预估、水资源量评估、积雪消融动态监测等场景。核心公式:
M = DDF × max(0, T − T_base)
其中 M 为日融雪量(mm/day,以水当量计),DDF 为度日因子
(mm·°C⁻¹·day⁻¹),T 为日平均气温,T_base 为融化临界温度(默认 0 °C)。
模型通过气温递减率(默认 6 °C/km)把参考气温下垫到每个像元,因此高海拔更冷、 融雪更慢。逐日循环中,每个像元的实际融雪受其剩余雪水当量(SWE)限制(不能 融超),累积形成逐像元径流深栅格;全流域平均得到逐日径流过程线(hydrograph), 并输出积雪面积随时间递减曲线(snow-cover depletion curve)。整个过程满足 水量守恒:累积径流 = 初始积雪 − 残余积雪。
支持 --synthetic 模式生成含高程带(500–3000 m)、春季升温过程与随高程分布
的初始积雪的完整模拟数据集,无需网络和真实数据即可验证流程。
pip install numpy rasterio scipy
python geoskill-snowmelt-runoff-modeling.py --bbox 116.0 39.0 117.0 40.0 --ddf 4.0 --output-dir ./output
python geoskill-snowmelt-runoff-modeling.py \
--bbox 116.0 39.0 117.0 40.0 \
--ddf 4.0 \
--synthetic \
--output-dir ./snowmelt_syn
python geoskill-snowmelt-runoff-modeling.py --bbox 116 39 117 40 --ddf 2.0 --synthetic --output-dir ./ddf2 --quiet
python geoskill-snowmelt-runoff-modeling.py --bbox 116 39 117 40 --ddf 6.0 --synthetic --output-dir ./ddf6 --quiet
python geoskill-snowmelt-runoff-modeling.py \
--input dem.tif \
--ddf 4.0 \
--n-days 90 \
--output-dir ./real_snowmelt
(真实模式下气温时序与初始积雪由高程合成,用于演示流程。)
python geoskill-snowmelt-runoff-modeling.py \
--bbox 116 39 117 40 \
--ddf 4.0 --t-base 1.0 --n-days 60 \
--synthetic --output-dir ./tbase1
| 文件 | 格式 | 说明 |
|---|---|---|
runoff_depth.tif | GeoTIFF (float32) | 累积融雪径流深(mm),EPSG:4326 |
runoff_time_series.json | JSON | 逐日径流过程线、积雪面积曲线、累积径流、气温序列、统计量 |
output-manifest.json | JSON | 运行清单(输入/输出/QA/软件版本) |
--synthetic 模式不读取任何外部数据MIT