Install
openclaw skills install @ruiduobao/geoskill-stream-flow-simulationopenclaw skills install @ruiduobao/geoskill-stream-flow-simulationThis skill simulates the runoff hydrograph and peak flow of small watersheds under design storms using classical runoff-generation and flow-concentration methods. It suits scenarios such as urban drainage, flood estimation for small and medium watersheds, and sponge-city assessment.
Core algorithms: SCS-CN runoff generation — S = 25400/CN − 254, Ia = 0.2·S, runoff depth Q = (P−Ia)²/(P−Ia+S), where CN is looked up from the USDA-NRCS standard table by land use type; design storm — triangular hyetograph, total rainfall given by --rainfall, with duration shortened as the return period --return-period increases (larger return periods concentrate the rainfall peak more); unit hydrograph flow concentration — the Kirpich formula estimates time of concentration from DEM slope and flow length, a triangular unit hydrograph is constructed and convolved with the net rainfall hyetograph to produce the runoff hydrograph, with the convolution strictly conserving water balance.
pip install 'numpy' 'rasterio' 'scipy'
python geoskill-stream-flow-simulation.py --bbox 116.0 39.0 117.0 40.0 --rainfall 100 --return-period 10
python geoskill-stream-flow-simulation.py --bbox 116.0 39.0 117.0 40.0 --synthetic --rainfall 80 --output-dir ./out
python geoskill-stream-flow-simulation.py --bbox 116 39 117 40 --synthetic --rainfall 180 --return-period 100 --output-dir ./out
python geoskill-stream-flow-simulation.py --bbox 121 31 122 32 --synthetic --rainfall 30 --return-period 2 --quiet
python geoskill-stream-flow-simulation.py --input basin.tif --rainfall 120 --return-period 20 --output-dir ./out
python geoskill-stream-flow-simulation.py --bbox 113 23 114 24 --synthetic --rainfall 150 --return-period 50 --output-dir ./out
| File | Format | Description |
|---|---|---|
runoff_depth.tif | GeoTIFF | SCS-CN runoff depth spatial distribution raster (mm) |
hydrograph.json | JSON | Runoff hydrograph (time/discharge) + peak flow + concentration parameters + water balance |
output-manifest.json | JSON | Run manifest (including QA: runoff coefficient, peak flow, water balance ratio) |
--input: local GeoTIFF (band1 = integer land use code, band2 = optional DEM).--synthetic: physically consistent DEM + tiled land-use land surface, fully offline.--synthetic mode requires no network at all.MIT
本 skill 用经典产汇流方法模拟小流域在设计暴雨下的径流过程线与洪峰流量,适用于城市排涝、中小流域洪水预估、海绵城市评估等场景。
核心算法:SCS-CN 产流——S = 25400/CN − 254,Ia = 0.2·S,径流深 Q = (P−Ia)²/(P−Ia+S),CN 由土地利用类型查 USDA-NRCS 标准值表;设计暴雨——三角形雨型,总雨量由 --rainfall 给定,历时随重现期 --return-period 缩短(重现期越大雨峰越集中);单位线汇流——Kirpich 公式由 DEM 坡度/流长估算汇流时间,构建三角单位线并与净雨过程卷积得径流过程线,卷积严格保证水量守恒。
pip install 'numpy' 'rasterio' 'scipy'
python geoskill-stream-flow-simulation.py --bbox 116.0 39.0 117.0 40.0 --rainfall 100 --return-period 10
python geoskill-stream-flow-simulation.py --bbox 116.0 39.0 117.0 40.0 --synthetic --rainfall 80 --output-dir ./out
python geoskill-stream-flow-simulation.py --bbox 116 39 117 40 --synthetic --rainfall 180 --return-period 100 --output-dir ./out
python geoskill-stream-flow-simulation.py --bbox 121 31 122 32 --synthetic --rainfall 30 --return-period 2 --quiet
python geoskill-stream-flow-simulation.py --input basin.tif --rainfall 120 --return-period 20 --output-dir ./out
python geoskill-stream-flow-simulation.py --bbox 113 23 114 24 --synthetic --rainfall 150 --return-period 50 --output-dir ./out
| 文件 | 格式 | 说明 |
|---|---|---|
runoff_depth.tif | GeoTIFF | SCS-CN 径流深空间分布栅格(mm) |
hydrograph.json | JSON | 径流过程线(时间/流量)+ 洪峰 + 汇流参数 + 水量平衡 |
output-manifest.json | JSON | 运行清单(含 QA:径流系数、洪峰、水量平衡比) |
--input:本地 GeoTIFF(band1 = 土地利用整型码,band2 = DEM 可选)。--synthetic:物理一致的 DEM + 分块土地利用下垫面,完全离线。--synthetic 模式完全无网络。MIT