nws-flood-thresholds
Retrieves National Weather Service flood stage thresholds for USGS monitoring stations.
Install
mkdir -p .claude/skills/nws-flood-thresholds && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5142" && unzip -o skill.zip -d .claude/skills/nws-flood-thresholds && rm skill.zipInstalls to .claude/skills/nws-flood-thresholds
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Download flood stage thresholds from NWS (National Weather Service). Use when determining flood levels for USGS stations, accessing action/minor/moderate/major flood stages, or matching stations to their flood thresholds.Key capabilities
- →Download NWS flood stage thresholds
- →Match USGS stations to flood levels
- →Filter flood data by state
- →Convert threshold strings to numeric values
How it works
It retrieves bulk CSV data from the NWS, cleans column mismatches, and maps USGS IDs to specific action, minor, moderate, or major flood stages.
Inputs & outputs
When to use nws-flood-thresholds
- →Determine flood levels for USGS stations
- →Access standardized NWS flood stage data
- →Match weather monitoring stations to flood thresholds
About this skill
NWS Flood Thresholds Guide
Overview
The National Weather Service (NWS) maintains flood stage thresholds for thousands of stream gages across the United States. These thresholds define when water levels become hazardous.
Data Sources
Option 1: Bulk CSV Download (Recommended for Multiple Stations)
https://water.noaa.gov/resources/downloads/reports/nwps_all_gauges_report.csv
Option 2: Individual Station Pages
https://water.noaa.gov/gauges/<station_id>
Example: https://water.noaa.gov/gauges/04118105
Flood Stage Categories
| Category | CSV Column | Description |
|---|---|---|
| Action Stage | action stage | Water level requiring monitoring, preparation may be needed |
| Flood Stage (Minor) | flood stage | Minimal property damage, some public threat. Use this to determine if flooding occurred. |
| Moderate Flood Stage | moderate flood stage | Structure inundation, evacuations may be needed |
| Major Flood Stage | major flood stage | Extensive damage, significant evacuations required |
For general flood detection, use the flood stage column as the threshold.
Downloading Bulk CSV
import pandas as pd
import csv
import urllib.request
import io
nws_url = "https://water.noaa.gov/resources/downloads/reports/nwps_all_gauges_report.csv"
response = urllib.request.urlopen(nws_url)
content = response.read().decode('utf-8')
reader = csv.reader(io.StringIO(content))
headers = next(reader)
data = [row[:43] for row in reader] # Truncate to 43 columns
nws_df = pd.DataFrame(data, columns=headers)
Important: CSV Column Mismatch
The NWS CSV has a known issue: header row has 43 columns but data rows have 44 columns. Always truncate data rows to match header count:
data = [row[:43] for row in reader]
Key Columns
| Column Name | Description |
|---|---|
usgs id | USGS station ID (8-digit string) |
location name | Station name/location |
state | Two-letter state code |
action stage | Action threshold (feet) |
flood stage | Minor flood threshold (feet) |
moderate flood stage | Moderate flood threshold (feet) |
major flood stage | Major flood threshold (feet) |
Converting to Numeric
Threshold columns need conversion from strings:
nws_df['flood stage'] = pd.to_numeric(nws_df['flood stage'], errors='coerce')
Filtering by State
# Get stations for a specific state
state_stations = nws_df[
(nws_df['state'] == '<STATE_CODE>') &
(nws_df['usgs id'].notna()) &
(nws_df['usgs id'] != '') &
(nws_df['flood stage'].notna()) &
(nws_df['flood stage'] != -9999)
]
Matching Thresholds to Station IDs
# Build a dictionary of station thresholds
station_ids = ['<id_1>', '<id_2>', '<id_3>']
thresholds = {}
for _, row in nws_df.iterrows():
usgs_id = str(row['usgs id']).strip()
if usgs_id in station_ids:
thresholds[usgs_id] = {
'name': row['location name'],
'flood': row['flood stage']
}
Common Issues
| Issue | Cause | Solution |
|---|---|---|
| Column mismatch error | CSV has 44 data columns but 43 headers | Truncate rows to 43 columns |
| Missing thresholds | Station not in NWS database | Skip station or use alternative source |
| Value is -9999 | No threshold defined | Filter out these values |
| Empty usgs id | NWS-only station | Filter by usgs id != '' |
Best Practices
- Always truncate CSV rows to match header count
- Convert threshold columns to numeric before comparison
- Filter out -9999 values (indicates no threshold defined)
- Match stations by USGS ID (8-digit string with leading zeros)
- Some stations may have flood stage but not action/moderate/major
When not to use it
- →Stations missing from NWS database
Prerequisites
Limitations
- →CSV column mismatch requires manual truncation
- →Some stations lack defined thresholds
How it compares
It automates the parsing of NWS bulk reports to programmatically link flood thresholds to USGS stream gages.
Compared to similar skills
nws-flood-thresholds side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| nws-flood-thresholds (this skill) | 1 | 6mo | Review | Intermediate |
| market-sizing-analysis | 73 | 2mo | No flags | Intermediate |
| exploratory-data-analysis | 15 | 2mo | Review | Intermediate |
| model-compare | 7 | 7mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by benchflow-ai
View all by benchflow-ai →You might also like
market-sizing-analysis
wshobson
This skill should be used when the user asks to "calculate TAM", "determine SAM", "estimate SOM", "size the market", "calculate market opportunity", "what's the total addressable market", or requests market sizing analysis for a startup or business opportunity.
exploratory-data-analysis
K-Dense-AI
Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats. This skill should be used when analyzing any scientific data file to understand its structure, content, quality, and characteristics. Automatically detects file type and generates detailed markdown reports with format-specific analysis, quality metrics, and downstream analysis recommendations. Covers chemistry, bioinformatics, microscopy, spectroscopy, proteomics, metabolomics, and general scientific data formats.
model-compare
rawwerks
Compare 3D CAD models using boolean operations (IoU, Dice, precision/recall). Use when evaluating generated models against gold references, diffing CAD revisions, or computing similarity metrics for ML training. Triggers on: model diff, compare models, IoU, intersection over union, model similarity, CAD comparison, STEP diff, 3D evaluation, gold reference, generated model, precision recall 3D.
astropy
davila7
Comprehensive Python library for astronomy and astrophysics. This skill should be used when working with astronomical data including celestial coordinates, physical units, FITS files, cosmological calculations, time systems, tables, world coordinate systems (WCS), and astronomical data analysis. Use when tasks involve coordinate transformations, unit conversions, FITS file manipulation, cosmological distance calculations, time scale conversions, or astronomical data processing.
statistical-analysis
anthropics
Apply statistical methods including descriptive stats, trend analysis, outlier detection, and hypothesis testing. Use when analyzing distributions, testing for significance, detecting anomalies, computing correlations, or interpreting statistical results.
datacommons-client
davila7
Work with Data Commons, a platform providing programmatic access to public statistical data from global sources. Use this skill when working with demographic data, economic indicators, health statistics, environmental data, or any public datasets available through Data Commons. Applicable for querying population statistics, GDP figures, unemployment rates, disease prevalence, geographic entity resolution, and exploring relationships between statistical entities.