Memory

Geoskill: Reservoir Capacity Change

Try it

Establish level-area-storage relationships from multi-period water surface, DEM, and water level data. Monitor reservoir capacity change and sedimentation trends. Use when analyzing reservoir storage changes, estimating current capacity, or detecting sedimentation from area-level curve shifts.

What it does

Establish level-area-storage relationships from multi-period water surface, DEM, and water level data. Monitor reservoir capacity change and sedimentation trends. Use when analyzing reservoir storage changes, estimating current capacity, or detecting sedimentation from area-level curve shifts.

The skill document

Reservoir Capacity Change

Combines multi-period water surface extent, DEM, and water level data to establish level-area-storage relationships, monitoring capacity change and sedimentation trends.

Trigger

Use when the user wants to:

  • Estimate current reservoir capacity from DEM and water level data
  • Analyze area-level relationships over time for sedimentation signals
  • Compute storage curves and their uncertainty
  • Compare storage between two periods
  • Generate water extent time series from DEM + water levels

CLI Usage

# Synthetic demo mode (no input files needed)
python scripts/reservoir_capacity_change.py --output-dir ./rcc-output

# With input DEM GeoTIFF
python scripts/reservoir_capacity_change.py \
  --dem ./data/reservoir_dem.tif \
  --water-levels ./data/water_levels.csv \
  --output-dir ./rcc-output

# With bounding box for area computation
python scripts/reservoir_capacity_change.py \
  --dem ./data/dem.tif \
  --bbox 116.0 39.5 116.5 40.0 \
  --output-dir ./rcc-output

# With vertical datum specification
python scripts/reservoir_capacity_change.py \
  --dem ./data/dem.tif \
  --dem-datum WGS84 \
  --water-level-datum WGS84 \
  --confidence 0.99 \
  --mc-iterations 1000 \
  --output-dir ./rcc-output

Parameters

ParameterDefaultDescription
--demNonePath to DEM GeoTIFF
--water-levelsNonePath to water levels CSV (date, level columns)
--reservoir-boundaryNonePath to reservoir boundary GeoJSON/Shapefile
--placeNonePlace name for AOI lookup
--bboxNoneBounding box: xmin ymin xmax ymax
--aoi-fileNonePath to AOI geometry file
--start-dateNoneStart date (ISO 8601)
--end-dateNoneEnd date (ISO 8601)
--datesNoneList of dates
--curve-methodtrapezoidalCurve method: trapezoidal, prism
--reference-levelNoneReference elevation level (m)
--dem-error5.0DEM vertical RMSE (meters)
--water-level-error0.3Water level measurement error (meters)
--water-body-error1.0Water boundary delineation error (pixels)
--mc-iterations500Monte Carlo iterations
--mc-seed42Monte Carlo random seed
--confidence0.95Confidence level for uncertainty
--dem-datumNoneDEM vertical datum
--water-level-datumNoneWater level vertical datum
--output-dir./rcc-outputOutput directory

Output

FileDescription
area_level_curve.csvElevation-area relationship
storage_curve.csvElevation-area-storage curve
storage_timeseries.csvStorage time series
water_extent_timeseries.csvWater extent time series
uncertainty.jsonMonte Carlo uncertainty analysis
request.jsonAnalysis request metadata
dataset-manifest.jsonDataset inventory
output-manifest.jsonOutput file inventory
qa.jsonQuality assurance checks

Curve Methods

MethodDescriptionFormula
trapezoidalArea by pixel counting, storage by trapezoidal integrationV(h) = integral of A(h) dh
prismDirect prism summation per pixelV(h) = sum(max(h - DEM_i, 0)) * pixel_area

Key Algorithms

Area at Level

Counts pixels with elevation <= water level, multiplied by pixel area. Handles both projected and geographic CRS (latitude correction).

Storage at Level (Prism Method)

For each inundated pixel, computes water depth = level - elevation, then sums depth * pixel area across all inundated pixels.

Trapezoidal Integration

Computes area at each level, then integrates using trapezoidal rule: V(h_i) = V(h_{i-1}) + (A_i + A_{i-1}) / 2 * dh

Monotonicity Enforcement

Area and storage curves are enforced non-decreasing by cumulative maximum.

Monte Carlo Uncertainty

Propagates DEM vertical error, water level measurement error, and water boundary delineation error through Monte Carlo simulation. Produces confidence intervals at each elevation level.

Exit Codes

CodeMeaning
0Success
2Argument error
3Dependency missing
6Data validation failure
7Processing failure

Limitations

  • Public DEMs (SRTM, Copernicus DEM) represent post-impoundment topography and cannot capture original reservoir basin shape
  • Sediment deposition alters topography over time; single DEM cannot represent multi-period bathymetry
  • Water level and satellite image dates may not coincide exactly
  • Mixed pixel effects at water boundaries cause area uncertainty
  • Relative storage change is more reliable than absolute storage volume
  • Absolute storage requires known vertical datum and calibration data
  • Outputs are analysis aids; engineering safety decisions require human review

References

  • Sawunyama, T. (2009). Estimating storage in reservoirs using remote sensing. IAHS Publ. 333.
  • Zhang, S. et al. (2014). Capability evaluation of retrieving reservoir parameters from satellite imagery.
  • McFeeters, S.K. (1996). The use of Normalized Difference Water Index. Remote Sensing.

数据下载

本 skill 可自动从 Microsoft Planetary Computer 下载数据 (无需 API key):

python reservoir_capacity_change.py --bbox 116,39,117,40 --date-range 2024-06-01,2024-06-30 --output-dir 
  • --bbox W,S,E,N: WGS-84 边界框 (西, 南, 东, 北)
  • --date-range START,END: 日期范围 (YYYY-MM-DD,YYYY-MM-DD)
  • --aoi-file : 替代 --bbox 的 GeoJSON 多边形
  • --cache-dir : 缓存目录 (默认 ~/.geoskill_cache)

当用户只给 --bbox + --date-range (没有 --dem) 时,skill 自动下载数据。 当用户给 --dem 时,走原文件路径 (向后兼容)。

Related skills

Extract shorelines, centerlines and channel widths from multi-temporal water body masks. Quantify shoreline migration, channel migration, change hotspots and migration zones. Use when analyzing river channel changes, identifying erosion/deposition areas, or generating river morphology reports.

1 installs

Monitor wetland extent, inundation frequency, and land cover transitions to identify degradation, recovery, and human encroachment. Use when the user wants to track wetland changes over time, assess wetland health, or detect conversion of wetlands to other land covers.

1 installs

Automated watershed delineation from DEM. Computes D8 flow direction, flow accumulation, delineates watersheds from outlet points, extracts stream networks, and generates statistics. Use when the user wants to delineate a watershed, compute flow accumulation, extract streams, or analyze hydrological characteristics from a DEM.

1 installs

基于 DEM 的 Bathtub 静态洪水淹没模拟,支持水文连通性约束(flood-fill)。Static bathtub flood inundation modeling from DEM with optional hydrological connectivity constraint. 输出淹没范围/水深 GeoTIFF + 面积体积统计 JSON。

Multi-criteria suitability analysis for infrastructure site selection. Use when the user wants to analyze changes, compare multi-temporal rasters, compute indices, or generate assessment reports.

1 installs

Multi-temporal shoreline change rate analysis. Generates transects, computes Endpoint Rate (EPR) and Linear Regression Rate (LRR), and identifies erosion hotspots. Use when monitoring coastline retreat/accretion or identifying erosion-prone segments.

1 installs