Install
openclaw skills install @ruiduobao/geoskill-frost-risk-mapping霜冻风险制图:由日最低温时序与 DEM 做高程递减率、冷空气湖(TPI 洼地)与坡向地形修正,逐像元统计霜冻频率/霜冻日数、初霜日、终霜日与无霜期,并分级霜冻风险。Frost risk mapping: terrain-corrected min-temperature (lapse rate, cold-air pooling via TPI, aspect) with frost frequency, first/last frost date, frost-free period and risk classification. 输出霜冻风险/无霜期/频率 GeoTIFF + 统计 JSON。
openclaw skills install @ruiduobao/geoskill-frost-risk-mappingPerforms terrain correction and frost risk analysis on daily minimum temperature time-series rasters, for agricultural frost disaster warning, cropping system zoning, and ecological cold damage assessment. Core algorithm:
apply_terrain_correction): corrects the minimum temperature from a reference surface to the actual per-pixel terrain —
· Lapse rate (default 6.5 °C/km): T(z) = T_ref − Γ·(z − z_ref), higher elevation means colder;
· Cold-air pooling: uses the Topographic Position Index TPI (pixel elevation − neighborhood mean) to identify depressions, where pooling of descending cold air causes additional cooling (capped at −6 °C), forming "frost hollows";
· Aspect effect: slope/aspect are derived from the DEM; in the northern hemisphere, south-facing slopes warm and north-facing slopes cool, with the effect strengthening as slope increases.--synthetic mode generates a DEM containing a ridge and a central depression (frost hollow), plus an elevation-influenced daily minimum temperature time series (flat reference surface + terrain correction), so the physical relationships — "temperature decreases with elevation", "high frost risk at high elevations / in depressions" — can be validated offline without network access or real data.
pip install 'numpy' 'rasterio' 'scipy'
python geoskill-frost-risk-mapping.py --bbox 116.0 39.0 117.0 40.0 --output-dir ./out
python geoskill-frost-risk-mapping.py --bbox 116.0 39.0 117.0 40.0 --synthetic --n-dates 40 --output-dir ./out
python geoskill-frost-risk-mapping.py --bbox 116.0 39.0 117.0 40.0 --synthetic --threshold -2 --output-dir ./light_frost
python geoskill-frost-risk-mapping.py --input tmin_ts.tif --dem dem.tif --threshold 0 --output-dir ./real
python geoskill-frost-risk-mapping.py --input tmin_ts.tif --correction none --output-dir ./raw
python geoskill-frost-risk-mapping.py --bbox 121.0 31.0 122.0 32.0 --synthetic --output-dir ./shanghai --quiet
| File | Format | Description |
|---|---|---|
frost_risk.tif | GeoTIFF (float32) | Frost risk level 0-4, EPSG:4326 |
frost_free_period.tif | GeoTIFF (float32) | Frost-free period (longest consecutive frost-free run, days) |
frost_frequency.tif | GeoTIFF (float32) | Frost frequency (0-1) |
frost_stats.json | JSON | Threshold/DEM range/mean frost statistics/risk distribution |
output-manifest.json | JSON | Run manifest (inputs/outputs/QA/software versions) |
--synthetic mode reads no external dataMIT
对日最低温时序栅格执行地形修正与霜冻风险分析,用于农业霜冻灾害预警、种植 制度区划与生态冷害评估。核心算法:
apply_terrain_correction):把参考面上的最低温修正到逐像元
实际地形——
· 高程递减率(lapse rate,默认 6.5°C/km):T(z) = T_ref − Γ·(z − z_ref),
高程越高越冷;
· 冷空气湖(cold-air pooling):用地形位置指数 TPI(像元高程 − 邻域均值)
识别洼地,洼地积聚下泄冷空气而额外降温(封顶 −6°C),形成"霜穴";
· 坡向效应(aspect):由 DEM 解算坡度/坡向,北半球南坡增温、北坡降温,
随坡度增大而增强。支持 --synthetic 模式生成含山脊与中央洼地(霜穴)的 DEM,以及受高程影响的
日最低温时序(平坦参考面 + 地形修正),无需网络和真实数据即可离线验证
"温度随高程递减""高海拔/洼地霜冻风险高"等物理关系。
pip install 'numpy' 'rasterio' 'scipy'
python geoskill-frost-risk-mapping.py --bbox 116.0 39.0 117.0 40.0 --output-dir ./out
python geoskill-frost-risk-mapping.py --bbox 116.0 39.0 117.0 40.0 --synthetic --n-dates 40 --output-dir ./out
python geoskill-frost-risk-mapping.py --bbox 116.0 39.0 117.0 40.0 --synthetic --threshold -2 --output-dir ./light_frost
python geoskill-frost-risk-mapping.py --input tmin_ts.tif --dem dem.tif --threshold 0 --output-dir ./real
python geoskill-frost-risk-mapping.py --input tmin_ts.tif --correction none --output-dir ./raw
python geoskill-frost-risk-mapping.py --bbox 121.0 31.0 122.0 32.0 --synthetic --output-dir ./shanghai --quiet
| 文件 | 格式 | 说明 |
|---|---|---|
frost_risk.tif | GeoTIFF (float32) | 霜冻风险等级 0-4,EPSG:4326 |
frost_free_period.tif | GeoTIFF (float32) | 无霜期(最长连续无霜天数) |
frost_frequency.tif | GeoTIFF (float32) | 霜冻频率(0-1) |
frost_stats.json | JSON | 阈值/DEM 范围/平均霜冻统计/风险分布 |
output-manifest.json | JSON | 运行清单(输入/输出/QA/软件版本) |
--synthetic 模式不读取任何外部数据MIT