hydrology-pysheds

Delineate watersheds and derive stream networks from DEM rasters using pysheds.

33|6|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill hydrology-pysheds
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hydrology-pysheds
Source: https://github.com/xjtulyc/awesome-rosetta-skills/tree/main/skills/04-earth-science/hydrology-pysheds
Command: npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill hydrology-pysheds

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill turns a Digital Elevation Model (DEM) into hydrological products like conditioned terrain, flow direction, flow accumulation, stream networks, and watershed boundaries, removing the need for manual GIS hydrology setup.

Core Features & Use Cases

  • DEM conditioning: fills pits, depressions, and resolves flats to produce a hydrologically correct surface for analysis.
  • Flow modeling on rasters: derives D8 flow direction and upstream contributing area via flow accumulation to support stream extraction.
  • Watershed delineation & runoff estimation: delineates catchments from a snapped pour point and estimates direct runoff using the SCS Curve Number method.
  • Use Case: you have a region’s DEM and a chosen outlet point, and you need the drainage area, stream network extent at a threshold, and an initial runoff depth estimate for hydrologic planning.

Quick Start

Tell the AI: “Using my DEM GeoTIFF, compute pit-filled/conditioned elevation, D8 flow direction, flow accumulation, extract a stream network by threshold, snap my pour point to the nearest stream cell, delineate the watershed polygon, and estimate runoff depth with the SCS Curve Number method.”

Frequently Asked Questions about hydrology-pysheds

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I delineate a watershed from a DEM raster in Python?

To delineate a watershed from a DEM, you condition the elevation surface by filling pits and resolving flats, compute D8 flow direction and accumulation, snap a pour point to the flow grid, and extract the resulting catchment polygon.

What is DEM conditioning for hydrological analysis?

DEM conditioning for hydrological analysis is the process of filling pits and depressions and resolving flat areas in a raster elevation model to create a hydrologically correct surface suitable for continuous flow routing and drainage extraction.

Do I need geopandas and rasterio to extract stream networks from flow accumulation?

Yes, extracting stream networks from flow accumulation requires a Python environment with pysheds, rasterio, geopandas, and numpy to handle raster grid processing, flow thresholding, and the spatial vectorization of drainage area outputs.

Can I estimate direct runoff using the SCS Curve Number method with a DEM?

Yes, you can estimate direct runoff using the SCS Curve Number method alongside DEM-derived catchment boundaries by delineating the specific drainage area from a snapped pour point to provide the hydrologic planning context for the runoff depth calculation.

Why does my flow accumulation raster have disconnected stream segments?

Disconnected stream segments in a flow accumulation raster typically occur when the DEM is not properly conditioned, meaning pits, depressions, and flat areas were not filled or resolved before computing D8 flow direction.