NWS
Explore US weather alerts, observations, forecast grids, bulletins, and river conditions
- Connector software
- Free and open source
- Service credentials
- Not needed
- Query Farm hosting
- Available · $10/month organization minimum
Use with an agent
Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.
npx skills add Query-farm/vgi-skills --skill orchard
Copy this request into your coding agent to get started.
Use https://query.farm/products/orchard/connectors/nws/index.md to help me query NWS with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.
See what you can query
Example output · captured
- Connector release
- v0.6.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
WITH crest AS (SELECT gauge_id, primary_unit, max(primary_value) AS peak_stage FROM nws.main.stageflow('RMDV2', product := 'forecast') GROUP BY gauge_id, primary_unit) SELECT c.gauge_id, c.peak_stage, c.primary_unit AS unit, max_by(t.category, t.stage) FILTER (WHERE t.stage <= c.peak_stage) AS category_reached, min_by(t.category, t.stage) FILTER (WHERE t.stage > c.peak_stage) AS next_category, min(t.stage) FILTER (WHERE t.stage > c.peak_stage) - c.peak_stage AS headroom
FROM crest c
JOIN nws.main.flood_thresholds('RMDV2') t ON t.gauge_id = c.gauge_id AND t.stage_unit = c.primary_unit
GROUP BY c.gauge_id, c.peak_stage, c.primary_unit
ORDER BY c.gauge_id
| gauge_id | peak_stage | unit | category_reached | next_category | headroom |
|---|---|---|---|---|---|
| RMDV2 | 6.3 | ft | NULL | action | 2.7 |
Quick start
Choose where to run NWS, then follow the steps below.
The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.
1. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
2. Attach the connector
Attach the release directly
Downloads the latest release for your platform and caches it locally.
ATTACH 'nws' AS nws (
TYPE vgi,
LOCATION 'github-auto://Query-farm/vgi-nws'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'nws' AS nws (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-nws:0.6.0'
);
3. Run a query
WITH crest AS (SELECT gauge_id, primary_unit, max(primary_value) AS peak_stage FROM nws.main.stageflow('RMDV2', product := 'forecast') GROUP BY gauge_id, primary_unit) SELECT c.gauge_id, c.peak_stage, c.primary_unit AS unit, max_by(t.category, t.stage) FILTER (WHERE t.stage <= c.peak_stage) AS category_reached, min_by(t.category, t.stage) FILTER (WHERE t.stage > c.peak_stage) AS next_category, min(t.stage) FILTER (WHERE t.stage > c.peak_stage) - c.peak_stage AS headroom
FROM crest c
JOIN nws.main.flood_thresholds('RMDV2') t ON t.gauge_id = c.gauge_id AND t.stage_unit = c.primary_unit
GROUP BY c.gauge_id, c.peak_stage, c.primary_unit
ORDER BY c.gauge_id
Run the connector on a server you manage. You operate the service and choose who can connect.
1. Deploy the connector on your server
Follow the connector’s deployment instructions. Use its supported HTTP transport, or launch it remotely over SSH. The connection guide explains both options.
2. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach the connector
For an HTTP deployment, replace the example URL with your endpoint. Add the authentication options your deployment requires. For SSH, use the SSH connection instructions.
ATTACH 'nws' AS nws
(TYPE vgi, LOCATION 'https://your-connector.example.com');
4. Run a query
WITH crest AS (SELECT gauge_id, primary_unit, max(primary_value) AS peak_stage FROM nws.main.stageflow('RMDV2', product := 'forecast') GROUP BY gauge_id, primary_unit) SELECT c.gauge_id, c.peak_stage, c.primary_unit AS unit, max_by(t.category, t.stage) FILTER (WHERE t.stage <= c.peak_stage) AS category_reached, min_by(t.category, t.stage) FILTER (WHERE t.stage > c.peak_stage) AS next_category, min(t.stage) FILTER (WHERE t.stage > c.peak_stage) - c.peak_stage AS headroom
FROM crest c
JOIN nws.main.flood_thresholds('RMDV2') t ON t.gauge_id = c.gauge_id AND t.stage_unit = c.primary_unit
GROUP BY c.gauge_id, c.peak_stage, c.primary_unit
ORDER BY c.gauge_id
Query Farm operates NWS for your team. Hosting has a $10 monthly minimum per organization; usage counts toward it. From $2.97 per instance-month ($10 monthly minimum).
1. Create your hosted connector
Open the console, choose your organization and deployment size, and add any service credentials there.
2. Install the vgi extension
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach your deployment
Copy the ATTACH statement from your deployment in the console and run it in DuckDB or Haybarn. Use nws as the catalog alias for the query below.
4. Run a query
WITH crest AS (SELECT gauge_id, primary_unit, max(primary_value) AS peak_stage FROM nws.main.stageflow('RMDV2', product := 'forecast') GROUP BY gauge_id, primary_unit) SELECT c.gauge_id, c.peak_stage, c.primary_unit AS unit, max_by(t.category, t.stage) FILTER (WHERE t.stage <= c.peak_stage) AS category_reached, min_by(t.category, t.stage) FILTER (WHERE t.stage > c.peak_stage) AS next_category, min(t.stage) FILTER (WHERE t.stage > c.peak_stage) - c.peak_stage AS headroom
FROM crest c
JOIN nws.main.flood_thresholds('RMDV2') t ON t.gauge_id = c.gauge_id AND t.stage_unit = c.primary_unit
GROUP BY c.gauge_id, c.peak_stage, c.primary_unit
ORDER BY c.gauge_id
Technical details
- Verified connector release
- v0.6.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
- Verified on
- December 1, 2026
Pin a version for production
When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.
Attach the release directly
Uses the verified release each time you attach the connector.
ATTACH 'nws' AS nws (
TYPE vgi,
LOCATION 'github-auto://Query-farm/[email protected]'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'nws' AS nws (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-nws:0.6.0'
);
Overview
US National Weather Service forecasts, alerts, observations and bulletins, river gauges and flood forecasts, plus NOAA outlook maps, buoys, space weather and MRMS radar grids, as SQL tables. No API key needed.
Read US National Weather Service (NWS) and National Water Prediction Service (NWPS) data, plus related NOAA products, as SQL tables. The worker covers four kinds of data: weather (alerts, observations, gridded forecasts, original text bulletins, zones and forecast-office assets); rivers and floods (NWPS gauges, stage/flow forecasts, flood thresholds and impacts, rating curves, low-water information and National Water Model reaches); spatial products from the NOAA/NWS GIS map services (SPC, WPC and CPC outlook polygons, winter and hazard outlooks, observed and analyzed rainfall, soil moisture, snow and air-quality rasters, storm reports); and other NOAA feeds (NDBC buoys, SWPC space weather, NHC tropical products, AviationWeather.gov and native MRMS radar grids). How the parts fit: start from a latitude/longitude with the point lookup to find the forecast office, grid cell and nearby stations, or pass a known station, office, zone or NWPS gauge ID directly. Readers with an _at suffix intersect a product with one point; their unsuffixed counterparts return the whole product. Discovery functions list GIS layers, API operations, buoy files and MRMS products so generic readers can fetch them. Positional arguments accept columns and correlated LATERAL calls; named options inside a LATERAL call need DuckDB 2.0.1 or later. No API key is required. Times are UTC TIMESTAMPTZ, missing data is NULL, and grid, river and gauge-datum units are kept as published. Network readers include source_url and fetched_at, honor upstream HTTP caching and raise HTTP errors rather than silently returning no rows. Outlook probabilities and categories are forecast products, not active warnings. The upstream APIs serve current and recent data, not comprehensive historical archives.
Set NWS_USER_AGENT to an identifying application/contact string. See NWS documentation and NWPS documentation.
Sources and references
- NWS API Web Service: forecasts, alerts, observations, zones and bulletins (api.weather.gov).
- National Water Prediction Service API: river gauges, stage/flow forecasts, flood thresholds and National Water Model reaches.
- NOAA/NWS GIS map services: the ArcGIS REST services behind the outlook, map and raster readers.
- Space Weather Prediction Center, National Data Buoy Center, AviationWeather.gov Data API and the MRMS product server: the remaining upstreams read by the space weather, buoy, aviation and MRMS functions.
Catalog
Everything nws exposes once attached — read straight from the worker's
released build.
main 92 functions
National Weather Service and National Water Prediction Service readers: forecasts, alerts, observations, bulletins, GIS outlooks, river gauges and related NOAA products.
Schema examples (15)
Compare the RMDV2 forecast crest with the gauge's flood thresholds: the highest category reached (NULL when below action stage), the next category above the crest, and the feet of headroom left
WITH crest AS (SELECT gauge_id, primary_unit, max(primary_value) AS peak_stage FROM nws.main.stageflow('RMDV2', product := 'forecast') GROUP BY gauge_id, primary_unit) SELECT c.gauge_id, c.peak_stage, c.primary_unit AS unit, max_by(t.category, t.stage) FILTER (WHERE t.stage <= c.peak_stage) AS category_reached, min_by(t.category, t.stage) FILTER (WHERE t.stage > c.peak_stage) AS next_category, min(t.stage) FILTER (WHERE t.stage > c.peak_stage) - c.peak_stage AS headroom
FROM crest c
JOIN nws.main.flood_thresholds('RMDV2') t ON t.gauge_id = c.gauge_id AND t.stage_unit = c.primary_unit
GROUP BY c.gauge_id, c.peak_stage, c.primary_unit
ORDER BY c.gauge_id;
| gauge_id | peak_stage | unit | category_reached | next_category | headroom |
|---|---|---|---|---|---|
| RMDV2 | 6.3 | ft | NULL | action | 2.7 |
Read the latest observation from the three stations nearest Charlottesville, ranking the point's observation stations by approximate distance in kilometres
SELECT s.station_id, s.name,
round(111.2 * sqrt((s.latitude - 38.0293) ^ 2 + ((s.longitude + 78.4767) * cos(radians(38.0293))) ^ 2), 1) AS distance_km,
o.observed_at, o.temperature_c, o.wind_speed_m_s
FROM nws.main.stations_at(38.0293, -78.4767) s,
LATERAL nws.main.latest_observation(s.station_id) o
ORDER BY distance_km, s.station_id
LIMIT 3;
Resolve Charlottesville to the name and website of its forecast office and the name of its forecast zone
SELECT p.office_id, f.name AS office_name, f.website, p.forecast_zone,
z.name AS zone_name
FROM nws.main.point(38.0293, -78.4767) p,
LATERAL nws.main.office(p.office_id) f,
LATERAL nws.main.zone('forecast', p.forecast_zone) z
ORDER BY p.office_id;
Find the forecast office and zone serving Charlottesville, Virginia
SELECT office_id, forecast_zone, grid_x, grid_y
FROM nws.main.point(38.0293, -78.4767);
11 more examples
Review active weather hazards in Virginia
SELECT event, severity, headline, expires
FROM nws.main.alerts(area := 'VA')
ORDER BY sent DESC;
Count the alerts that covered a garden in Charlottesville over the past week and list their event names; 0 alerts means no alert covered the point
SELECT count(*) AS alerts, list(DISTINCT event ORDER BY event) AS events,
max(sent) AS latest_sent
FROM nws.main.alerts_at(38.0293, -78.4767, active := false);
Read full details for current Virginia alert identifiers
SELECT d.event, d.headline, d.description
FROM nws.main.alerts(area := 'VA') a,
LATERAL nws.main.alert(a.id) d
LIMIT 5;
Discover freeze-related alert event names
SELECT event
FROM nws.main.alert_types()
WHERE event ILIKE '%freeze%'
ORDER BY event;
Discover weather observation stations for a location
SELECT station_id, name, elevation_m
FROM nws.main.stations_at(38.0293, -78.4767)
ORDER BY station_id;
Inspect Charlottesville airport observation station
SELECT station_id, name, elevation_m FROM nws.main.station('KCHO');
Summarize recent temperatures from a station
SELECT min(temperature_c) AS minimum_c, max(temperature_c) AS maximum_c
FROM nws.main.observations('KCHO');
Inspect the latest temperature and wind observation
SELECT observed_at, temperature_c, wind_speed_m_s
FROM nws.main.latest_observation('KCHO');
Review the upcoming day/night forecast
SELECT start_time, temperature_c, short_forecast
FROM nws.main.forecast(38.0293, -78.4767)
ORDER BY start_time;
Inspect hourly garden temperatures
SELECT start_time, temperature_c, short_forecast
FROM nws.main.forecast_hourly(38.0293, -78.4767)
ORDER BY start_time;
Inspect minimum temperature intervals without assuming hourly samples
SELECT valid_from, valid_to, value, unit
FROM nws.main.grid_series(38.0293, -78.4767, variable := 'minTemperature')
ORDER BY valid_from;
air_quality_at (latitude DOUBLE, longitude DOUBLE, bias_corrected := BOOLEAN, end_time := VARCHAR, max_pages := DOUBLE, page_size := DOUBLE, product := VARCHAR, start_time := VARCHAR, subset := VARCHAR)
Read NWS air-quality forecast rasters at a point, covering all published PM2.5, ozone, smoke and dust service variants. Native values and complete currently published time slices are preserved. PM2.5 and surface dust use micrograms/m³ and ozone uses ppb according to service descriptions. Smoke and column-integral descriptions contain ambiguous units, so unit remains NULL and source_description/interpretation_note retain that uncertainty. No AQI, health category, or unit conversion is inferred. Product averaging periods and daily maxima are separate choices; native validity times remain authoritative. The hr01 bias-corrected PM2.5 service has conflicting legacy averaging prose, explicitly noted in output.
Inspect the complete available PM2.5 forecast at Charlottesville
SELECT pollutant, value, unit, valid_from, issued_at
FROM nws.main.air_quality_at(38.0293,-78.4767)
ORDER BY valid_from, raster_id;
alert (alert_id VARCHAR, max_pages := DOUBLE)
Retrieve one NWS alert message by its full identifier, including its original text and referenced messages.
Read full details for current Virginia alert identifiers
SELECT d.event, d.headline, d.description
FROM nws.main.alerts(area := 'VA') a,
LATERAL nws.main.alert(a.id) d
LIMIT 5;
alert_types (max_pages := DOUBLE)
List event names supported by the NWS alerts API for use in the event filter.
Discover freeze-related alert event names
SELECT event
FROM nws.main.alert_types()
WHERE event ILIKE '%freeze%'
ORDER BY event;
alerts (active := BOOLEAN, area := VARCHAR, end_time := VARCHAR, event := VARCHAR, max_pages := DOUBLE, start_time := VARCHAR, zone := VARCHAR)
Stream active or recent NWS alerts, including zone-based warnings, original text, VTEC parameters, and update references.
Review active weather hazards in Virginia
SELECT event, severity, headline, expires
FROM nws.main.alerts(area := 'VA')
ORDER BY sent DESC;
alerts_at (latitude DOUBLE, longitude DOUBLE, active := BOOLEAN, end_time := VARCHAR, event := VARCHAR, max_pages := DOUBLE, start_time := VARCHAR)
Find active or recent alerts affecting a point using NWS's point filter, which includes alerts defined by zones without polygons.
Count the alerts that covered a garden in Charlottesville over the past week and list their event names; 0 alerts means no alert covered the point
SELECT count(*) AS alerts, list(DISTINCT event ORDER BY event) AS events,
max(sent) AS latest_sent
FROM nws.main.alerts_at(38.0293, -78.4767, active := false);
api_endpoints (max_pages := DOUBLE, service := VARCHAR)
Discover readable GET operations directly from the current official weather.gov, NWPS or Aviation Weather Center API specification. Includes station discovery, zone forecasts, office headlines, radio transmitters/broadcasts, radar status, aviation METAR/TAF/PIREPs/SIGMETs/G-AIRMETs/CWAs, navigation references and remaining river products. Parameters retain published names, required flags, types and constraints. Use api_rows to read actual records. Binary imagery and internal monitoring are excluded; deprecated operations are labeled.
Discover current aviation products and required filters
SELECT operation_id, description, parameters_json
FROM nws.main.api_endpoints(service := 'aviation')
WHERE NOT deprecated
ORDER BY operation_id;
api_rows (service VARCHAR, operation_id VARCHAR, parameters_json VARCHAR, max_pages := DOUBLE)
Read actual records from an operation discovered through api_endpoints, retaining all native JSON or original aviation text. GeoJSON features and standard collections emit one row per record; hierarchical products emit one complete JSON record, preserving their nested units and times. Follow NWS pagination to completion. Aviation has no pagination: responses reaching 400 records fail so filters can be narrowed. Missing aviation data (HTTP 204) emits no rows. Requests are limited to trusted official roots; schema constraints and parameter names are checked. Use dedicated typed readers where available and JSON extraction for less common products. Native geometry is not reprojected.
Read decoded METAR records with their full native fields and units
SELECT record_id, record_json
FROM nws.main.api_rows('aviation','metar','{"ids":"KCHO"}')
ORDER BY row_index;
beach_forecast (bbox := VARCHAR, day := DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read NWS marine/beach forecast areas for day 1 or day 2. Rip/swim risk, surf, water temperature, UV, weather and wind wording are preserved as source text, because ranges and units vary by office. Unavailable values such as N/A remain distinguishable from measured zero. The service can include locations with no current forecast; has_forecast identifies usable product-date records. This does not supply a continuous coastal ocean model. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published beach forecast features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'office_id': office_id, 'beach_name': beach_name, 'has_forecast': has_forecast, 'rip_current_risk': rip_current_risk, 'surf_text': surf_text, 'water_temperature_text': water_temperature_text} ORDER BY object_id) AS details
FROM nws.main.beach_forecast();
beach_forecast_at (latitude DOUBLE, longitude DOUBLE, day := DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read NWS marine/beach forecast areas for day 1 or day 2. Rip/swim risk, surf, water temperature, UV, weather and wind wording are preserved as source text, because ranges and units vary by office. Unavailable values such as N/A remain distinguishable from measured zero. The service can include locations with no current forecast; has_forecast identifies usable product-date records. This does not supply a continuous coastal ocean model. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Inspect the beach forecast features covering Miami Beach with their original wording
SELECT office_id, beach_name, has_forecast, rip_current_risk, surf_text,
water_temperature_text
FROM nws.main.beach_forecast_at(25.8204, -80.0861)
ORDER BY object_id;
briefing (office_id VARCHAR, max_pages := DOUBLE)
Read the current office briefing metadata and document link; no active briefing produces zero rows.
Find the current local weather briefing document
SELECT title, download_url FROM nws.main.briefing('LWX');
buoy_measurements (station_id VARCHAR, end_time := VARCHAR, max_pages := DOUBLE, page_size := DOUBLE, product := VARCHAR, start_time := VARCHAR, variable := VARCHAR)
Read NDBC realtime measurements as long-form rows with native variable names, units, timestamps and original value tokens. Supports all 15 current realtime formats, including directional wave spectra and DART seconds. MM and documented spectral/continuous-wind missing codes become NULL; zero remains zero and categorical text remains available. Each spectral bin has frequency_hz; ADCP bin names and quality fields remain distinct. Source files normally cover recent observations, not a complete historical archive. File content changes during paging raise an error. DART water-column heights are raw measurements, not tsunami warnings.
Read buoy wave-height observations in native metres
SELECT observed_at, variable, value, unit
FROM nws.main.buoy_measurements('44014', variable := 'WVHT')
ORDER BY observed_at DESC;
buoy_products (station_id VARCHAR, max_pages := DOUBLE)
List realtime files actually published for an NDBC station. Includes meteorology, wave summary/spectra, ocean chemistry, currents, radiation, rainfall, drifting platforms, supplemental wind/pressure, and DART water-column height where available. File existence does not imply freshness; inspect observation timestamps. Supported suffixes can be passed to buoy_measurements; unrecognized formats remain discoverable with supported=false.
Find currently published products for an offshore buoy
SELECT product, supported, data_url
FROM nws.main.buoy_products('44014')
ORDER BY product;
buoy_stations (max_pages := DOUBLE)
Discover active NDBC stations and partner platforms, including buoys, coastal stations and DART tsunami instruments. Source flags describe instrument/data capabilities, not whether every product currently has a fresh observation. Units and positions are native station metadata; drifting platform measurements may contain changing positions.
Discover active marine observation stations
SELECT station_id, name, latitude, longitude
FROM nws.main.buoy_stations()
WHERE meteorology
ORDER BY station_id;
climate_outlook (bbox := VARCHAR, include_geometry := BOOLEAN, lead := DOUBLE, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR, variable := VARCHAR)
Read CPC 6–10 day, 8–14 day, monthly, or seasonal temperature/precipitation outlooks. Seasonal leads 1–13 select successive three-month windows; monthly and seasonal target_period text is retained without inventing exact timestamps. Probabilities refer to the published above/near/below-normal category, not temperature values, rainfall amounts, or the chance of any rain. Forecast dates have day precision; the last validity date is inclusive. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published climate outlook features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'variable': variable, 'category': category, 'probability_pct': probability_pct, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.climate_outlook(period := '8_14_day');
climate_outlook_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, lead := DOUBLE, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR, variable := VARCHAR)
Read CPC 6–10 day, 8–14 day, monthly, or seasonal temperature/precipitation outlooks. Seasonal leads 1–13 select successive three-month windows; monthly and seasonal target_period text is retained without inventing exact timestamps. Probabilities refer to the published above/near/below-normal category, not temperature values, rainfall amounts, or the chance of any rain. Forecast dates have day precision; the last validity date is inclusive. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the climate outlook features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'variable': variable, 'category': category, 'probability_pct': probability_pct, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.climate_outlook_at(38.0293, -78.4767, period := '8_14_day');
drought_outlook (bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR)
Read CPC monthly or seasonal drought outlook polygon layers for the US and Puerto Rico. These describe expected drought change, not a current drought-severity index. Native target-period text is retained without inventing a missing end year; separate island-territory point layers are outside this function's coverage. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published drought outlook features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'period': period, 'category': category, 'forecast_date': forecast_date, 'target_period': target_period} ORDER BY object_id) AS details
FROM nws.main.drought_outlook(period := 'monthly');
drought_outlook_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR)
Read CPC monthly or seasonal drought outlook polygon layers for the US and Puerto Rico. These describe expected drought change, not a current drought-severity index. Native target-period text is retained without inventing a missing end year; separate island-territory point layers are outside this function's coverage. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the drought outlook features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'period': period, 'category': category, 'forecast_date': forecast_date, 'target_period': target_period} ORDER BY object_id) AS details
FROM nws.main.drought_outlook_at(38.0293, -78.4767, period := 'monthly');
fire_outlook (bbox := VARCHAR, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read SPC day 1–8 fire-weather outlooks for wind/low humidity or dry thunderstorms. Days 1–2 use categorical codes; days 3–8 use native probability fractions, converted to percent separately. A zero code means no delineated probability area, not zero risk. These are not active fire perimeters or warnings. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published fire outlook features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'day': day, 'hazard': hazard, 'category': category, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.fire_outlook(day := 1);
fire_outlook_at (latitude DOUBLE, longitude DOUBLE, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read SPC day 1–8 fire-weather outlooks for wind/low humidity or dry thunderstorms. Days 1–2 use categorical codes; days 3–8 use native probability fractions, converted to percent separately. A zero code means no delineated probability area, not zero risk. These are not active fire perimeters or warnings. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the fire outlook features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'day': day, 'hazard': hazard, 'category': category, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.fire_outlook_at(38.0293, -78.4767, day := 1);
flash_flood_guidance_at (latitude DOUBLE, longitude DOUBLE, hours := DOUBLE, max_pages := DOUBLE)
Sample RFC gridded flash flood guidance: estimated rainfall over a selected duration that could cause small streams to flood under current soil/stream conditions. Native GRIB FFLDG values are kg/m², numerically equivalent to millimetres of water; inches are explicitly converted, never taken from a color class. Durations 1/3/6 hours have broad CONUS coverage; 12-hour guidance is regional. The discontinued 24-hour layer is rejected even if still listed. Coverage and RFC methods vary. This is guidance, not a forecast rainfall amount or an active warning. NoData remains NULL and no footprint emits no rows.
Inspect three-hour flash flood guidance at Charlottesville
SELECT hours, threshold_mm, threshold_inches, valid_at
FROM nws.main.flash_flood_guidance_at(38.0293,-78.4767)
ORDER BY raster_id;
flood_impacts (gauge_id VARCHAR, max_pages := DOUBLE)
Read published local flood impact statements at specific gauge stages. These describe consequences at the gauge's datum, not a flood inundation map.
Read local flood consequences by river stage
SELECT stage, stage_unit, statement
FROM nws.main.flood_impacts('RMDV2')
ORDER BY stage;
flood_thresholds (gauge_id VARCHAR, max_pages := DOUBLE)
Read NWPS action, minor, moderate, and major flood thresholds with separate stage and flow units. Threshold flow units may differ from stageflow units.
Inspect gauge-specific flood stage thresholds
SELECT category, stage, stage_unit
FROM nws.main.flood_thresholds('RMDV2')
ORDER BY stage;
forecast (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE)
Read the NWS day/night period forecast for a point, including the full narrative for each period.
Review the upcoming day/night forecast
SELECT start_time, temperature_c, short_forecast
FROM nws.main.forecast(38.0293, -78.4767)
ORDER BY start_time;
forecast_hourly (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE)
Read the NWS hourly forecast for a point with typed period times, Celsius temperatures, precipitation probability, and wind text.
Inspect hourly garden temperatures
SELECT start_time, temperature_c, short_forecast
FROM nws.main.forecast_hourly(38.0293, -78.4767)
ORDER BY start_time;
gauge (gauge_id VARCHAR, max_pages := DOUBLE)
Retrieve National Water Prediction Service gauge metadata, current observed and forecast status, datum information, and data attribution. Gauge IDs are NWS LIDs, not USGS numeric IDs.
Inspect the James River gauge at Richmond-Westham
SELECT name, state, status_json FROM nws.main.gauge('RMDV2');
gauges (bbox := VARCHAR, max_pages := DOUBLE, state := VARCHAR)
Discover geolocated NWPS gauges by state or WGS84 bounding box. At least one scope is required. Requests stream across bounded geographic tiles, then filter state exactly and deduplicate shared tile edges. Results include observed/forecast status and identifiers for gauge and stageflow.
Discover Virginia river gauges and their reported observed status
SELECT gauge_id, name, state, observed_category
FROM nws.main.gauges(state := 'VA')
ORDER BY gauge_id;
gauges_near (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, radius_km := DOUBLE, state := VARCHAR)
Find NWPS gauges within a great-circle radius of a location. Uses geographic bounding boxes, then an exact spherical distance filter; supports poles and the antimeridian. Order by distance_km to obtain nearest gauges; input/output order does not imply distance or hydrologic connectivity.
Find nearby Richmond gauges ordered by distance in kilometres
SELECT gauge_id, name, distance_km
FROM nws.main.gauges_near(37.5407, -77.4360, radius_km := 50)
ORDER BY distance_km, gauge_id;
glossary (max_pages := DOUBLE)
Search NWS meteorological glossary terms and their published definitions.
Look up official frost terminology
SELECT term, definition FROM nws.main.glossary() WHERE term ILIKE '%frost%';
grid_series (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, variable := VARCHAR)
Read raw NWS forecast grid variables as their original validity intervals. Numeric values retain native WMO units; structured weather and hazards are JSON. No hourly interpolation is applied.
Inspect minimum temperature intervals without assuming hourly samples
SELECT valid_from, valid_to, value, unit
FROM nws.main.grid_series(38.0293, -78.4767, variable := 'minTemperature')
ORDER BY valid_from;
historic_crests (gauge_id VARCHAR, max_pages := DOUBLE)
Read published historic river crests with units and old-datum flags. This curated list is not a continuous historical observation archive.
Review the largest published historical crests and datum caveats
SELECT occurred_at, stage, stage_unit, old_datum
FROM nws.main.historic_crests('RMDV2')
ORDER BY stage DESC
LIMIT 5;
historic_low_water (gauge_id VARCHAR, max_pages := DOUBLE)
Read the NWPS curated historical low-water events, including stage, flow, units, date, and original statement. This is not a continuous historical record. Stage is relative to the gauge datum; the source does not supply a datum-change flag for these events.
Review the published historical low-water events for the Mississippi River at St. Louis and their units
SELECT occurred_at, stage, stage_unit, flow, flow_unit, statement
FROM nws.main.historic_low_water('EADM7')
ORDER BY occurred_at;
latest_observation (station_id VARCHAR, max_pages := DOUBLE)
Read the most recent NWS station observation; missing measurements remain NULL and observation time is separate from retrieval time.
Inspect the latest temperature and wind observation
SELECT observed_at, temperature_c, wind_speed_m_s
FROM nws.main.latest_observation('KCHO');
latest_product (product_type VARCHAR, office_id VARCHAR, max_pages := DOUBLE)
Retrieve the latest complete NWS text bulletin for a product type and office, such as an Area Forecast Discussion or Hazardous Weather Outlook.
Read the latest forecast discussion, including forecaster reasoning
SELECT issued_at, product_text FROM nws.main.latest_product('AFD', 'LWX');
long_range_flood_outlook (bbox := VARCHAR, gauge_id := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, state := VARCHAR, threshold_pct := DOUBLE)
Read three-month probabilistic river flood outlooks at NWS forecast gauges. Emits a row for each minor/moderate/major flood category, preserving censored probabilities such as <0.05 as bounds and explicit inclusivity flags. The map threshold selects the source classification layer and does not change the native category probabilities. target_period is native season text; exact dates are not inferred. Availability is limited to locations with probabilistic forecasts. State/gauge filters continue through every page.
Inspect long-range flood probabilities for Virginia gauges without losing censored values
SELECT gauge_id, flood_category, probability_text, target_period
FROM nws.main.long_range_flood_outlook(state := 'VA')
ORDER BY gauge_id, flood_category;
low_water_impacts (gauge_id VARCHAR, max_pages := DOUBLE)
Read published NWPS low-water impact statements. The associated value is source text and may include qualifications; no numeric stage or unit is inferred. A gauge without impact statements returns no rows.
Read the Mississippi River at St. Louis low-water impacts with their original threshold wording
SELECT value_text, statement
FROM nws.main.low_water_impacts('EADM7')
ORDER BY value_text;
low_water_threshold (gauge_id VARCHAR, max_pages := DOUBLE)
Read a gauge's published NWPS low-water threshold with its native units. A missing threshold returns no rows. It is distinct from flood categories and does not establish navigability or water availability.
Inspect the published low-water threshold for the Mississippi River at St. Louis
SELECT gauge_id, threshold, unit
FROM nws.main.low_water_threshold('EADM7')
ORDER BY gauge_id;
map_features (product_id VARCHAR, layer_id DOUBLE, bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read a discovered NWS Feature Layer as rows with native attributes and optional WGS84 GeoJSON. Supports all public NWS GIS product families, including sea ice, river breakup, fire spot forecasts, tropical and coastal layers. Resolve current layer IDs and field meanings with map_layers/map_fields. Pagination orders by the layer's declared object ID and supports dateline bounds. A live layer is not a transactional snapshot or a historical archive; independently issued features retain their own timestamps. Missing intersection does not establish absence of risk.
Read native NWS discussion features and their attributes
SELECT object_id, attributes_json
FROM nws.main.map_features('vector:outlooks/spc_mesoscale_discussion/MapServer', 0)
ORDER BY object_id;
map_features_at (product_id VARCHAR, layer_id DOUBLE, latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read a discovered NWS Feature Layer as rows with native attributes and optional WGS84 GeoJSON. Supports all public NWS GIS product families, including sea ice, river breakup, fire spot forecasts, tropical and coastal layers. Resolve current layer IDs and field meanings with map_layers/map_fields. Pagination orders by the layer's declared object ID and supports dateline bounds. A live layer is not a transactional snapshot or a historical archive; independently issued features retain their own timestamps. Missing intersection does not establish absence of risk.
Read the native attributes of the NWS beach forecast area covering Miami Beach
SELECT object_id, attributes_json
FROM nws.main.map_features_at('vector:outlooks/marine_beachforecast_summary/MapServer', 0, 25.8204, -80.0861)
ORDER BY object_id;
map_fields (product_id VARCHAR, layer_id := DOUBLE, max_pages := DOUBLE)
Inspect the native field schema and coded-value domains of a NWS map layer or image catalog. Use aliases and domains to interpret attributes_json. This describes fields, not observations; units are never inferred from a coordinate system.
Inspect discussion attributes and their meaning
SELECT field_name, alias, field_type
FROM nws.main.map_fields('vector:outlooks/spc_mesoscale_discussion/MapServer')
ORDER BY field_name;
map_image_at (product_id VARCHAR, latitude DOUBLE, longitude DOUBLE, end_time := VARCHAR, max_pages := DOUBLE, page_size := DOUBLE, start_time := VARCHAR, subset := VARCHAR)
Sample every matching native raster in a NWS ImageServer at a point, preserving temporal slices and separate bands. Enumerates the image catalog and samples explicitly locked raster IDs in bounded pages, avoiding the service's silent mosaic limit. Optional dates filter native validity intervals. Native pixel values are not guaranteed physical measurements: some radar services contain color bands. No units, probabilities, or missing timestamps are invented. This is the currently published catalog, not a historical archive. Changes between catalog enumeration and sampling fail explicitly.
Read the available hourly PM2.5 raster series at Charlottesville
SELECT valid_from, raw_value, band_index
FROM nws.main.map_image_at('raster:air_quality/ndgd_apm25_hr01/ImageServer',38.0293,-78.4767)
ORDER BY valid_from, raster_id, band_index;
map_layers (product_id VARCHAR, max_pages := DOUBLE)
List current layers and the appropriate data reader for a discovered NWS GIS product. Groups organize layers and do not contain independently readable data. ImageServer pixels use map_image_at without a layer ID. Service description and native time metadata are retained; map units such as metres refer to coordinates and must not be mistaken for pixel units.
Find queryable mesoscale discussion layers
SELECT layer_id, layer_name, reader
FROM nws.main.map_layers('vector:outlooks/spc_mesoscale_discussion/MapServer')
ORDER BY layer_id;
map_products (folder := VARCHAR, include_alternates := BOOLEAN, max_pages := DOUBLE, server := VARCHAR)
Discover public NWS GIS products across vector, raster, tropical and eventdriven service directories. Results are live service identifiers, including aviation, sea ice, river breakup, spot forecasts, surface analyses, NDFD, climate, radar and tropical products. Use map_layers then map_fields to inspect a product before reading features or pixels. Utilities are omitted; duplicate FeatureServer views are optional. This lists service availability, not whether current hazards exist.
Discover available NWS outlook services
SELECT product_id, service_type
FROM nws.main.map_products(server := 'vector', folder := 'outlooks')
ORDER BY product_id;
map_raster_at (product_id VARCHAR, layer_id DOUBLE, latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE)
Sample raw pixels from a discovered NWS Mosaic Layer in any of the four map servers. Use map_layers to select the mosaic group ID, not its rendered Image child. Native values, source attributes and footprint timestamps are preserved; unit is NULL because generic service coordinate units are not pixel units. Use a specialized reader for verified conversions. No coverage emits no rows; NoData within a known raster emits NULL. Different overlapping rasters remain separate rows.
Discover a flash flood guidance mosaic and inspect its native pixels
SELECT r.raw_value, r.raster_name, r.valid_at
FROM (SELECT min(layer_id) AS layer_id FROM nws.main.map_layers('raster:precip/rfc_gridded_ffg/MapServer') WHERE layer_type = 'Mosaic Layer') l,
LATERAL nws.main.map_raster_at('raster:precip/rfc_gridded_ffg/MapServer',l.layer_id,38.0293,-78.4767) r
ORDER BY r.raster_id;
mesoscale_discussions (bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read current SPC mesoscale discussion areas for developing severe thunderstorms or hazardous winter weather. Native discussion identifiers, descriptive information and popup HTML are preserved. Popup HTML includes the source discussion link; original bulletin text is also accessible through the worker's text-product readers. NoArea placeholder polygons are omitted. These are forecaster discussions, not warnings. Each discussion may have a different publication time. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published mesoscale discussions features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'discussion_number': discussion_number, 'discussion_info': discussion_info, 'discussion_html': discussion_html} ORDER BY object_id) AS details
FROM nws.main.mesoscale_discussions();
mesoscale_discussions_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read current SPC mesoscale discussion areas for developing severe thunderstorms or hazardous winter weather. Native discussion identifiers, descriptive information and popup HTML are preserved. Popup HTML includes the source discussion link; original bulletin text is also accessible through the worker's text-product readers. NoArea placeholder polygons are omitted. These are forecaster discussions, not warnings. Each discussion may have a different publication time. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the mesoscale discussions features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'discussion_number': discussion_number, 'discussion_info': discussion_info, 'discussion_html': discussion_html} ORDER BY object_id) AS details
FROM nws.main.mesoscale_discussions_at(38.0293, -78.4767);
mrms_at (product_id VARCHAR, latitude DOUBLE, longitude DOUBLE, file_time := VARCHAR, level := DOUBLE, max_pages := DOUBLE)
Download and decode a native MRMS GRIB2 grid to return the nearest grid-cell value, not a rendered color. Uses native ECMWF ecCodes for regular latitude/longitude GRIB2 grids and the packing codecs enabled in that build, including PNG. Requires grib_ls and grib_get on PATH or in NWS_ECCODES_BIN. Defaults to the latest retained file and lowest available native file level; specify file_time and level to reproduce a listed file. Returns physical units and distinct missing/no-coverage/range-folded codes from NOAA's parameter table, preserving raw_value. Zero remains numeric even when a source table uses ambiguous zero codes, which are labeled. Unknown parameter codes retain raw values and NULL units. Outside the grid emits no rows. Unsupported/corrupt encodings fail explicitly. Each call reads a complete source grid: compressed downloads are bounded to 32 MiB, GRIB messages to 64 MiB, and grids to 64 million points. Native decoding is serialized per worker process with a 30-second limit per ecCodes command. Shared HTTP caching reduces repeated downloads; use GIS QPE sampling for lightweight routine rainfall queries.
Read actual radar precipitation rate at Charlottesville from native GRIB2
SELECT valid_at, value, unit, value_status, grid_latitude, grid_longitude
FROM nws.main.mrms_at('2D/PrecipRate',38.0293,-78.4767)
ORDER BY valid_at;
mrms_products (folder := VARCHAR, max_pages := DOUBLE)
Discover native public MRMS GRIB2 directories and currently retained files, including physical radar reflectivity, precipitation rate and accumulations, multi-sensor QPE, hail, rotation, lightning, quality fields, environmental fields and 3D radar levels. Start at 2D, 3DRefl, 3DRhoHV or 3DZdr; follow directory product_ids through regional and product folders. File rows expose native levels and filename UTC times. Units/descriptions come from NOAA NSSL's published v12.2 parameter table; unknown products retain NULL metadata. Use mrms_at for an actual decoded point sample. Directory availability varies by region and is not a historical archive.
Discover quantitative MRMS radar and precipitation products
SELECT product_id, unit, description
FROM nws.main.mrms_products()
WHERE kind = 'directory'
ORDER BY product_id;
observations (station_id VARCHAR, end_time := VARCHAR, max_pages := DOUBLE, page_size := DOUBLE, start_time := VARCHAR)
Stream recent station observations (typically seven days), normalizing common quantities to SI units while retaining quality flags and original measurements.
Summarize recent temperatures from a station
SELECT min(temperature_c) AS minimum_c, max(temperature_c) AS maximum_c
FROM nws.main.observations('KCHO');
office (office_id VARCHAR, max_pages := DOUBLE)
Retrieve NWS forecast office contact information and responsible county and forecast zone links.
Find the local forecast office website
SELECT name, website FROM nws.main.office('LWX');
parse_valid_time (valid_time VARCHAR)
Decode an NWS validTime interval into UTC start/end times and its duration in hours without requesting a forecast. Supports day/time ISO8601 durations or an explicit end timestamp; calendar months and years are rejected.
Decode a two-hour NWS forecast validity interval
SELECT valid_from, valid_to, duration_hours
FROM nws.main.parse_valid_time('2026-01-02T12:00:00Z/PT2H')
ORDER BY valid_from;
SELECT duration_hours
FROM nws.main.parse_valid_time('2026-01-02T12:00:00Z/PT2H')
ORDER BY valid_from;
point (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE)
Resolve a US latitude and longitude to NWS grids, offices, zones, timezone, radar, and forecast links.
Find the forecast office and zone serving Charlottesville, Virginia
SELECT office_id, forecast_zone, grid_x, grid_y
FROM nws.main.point(38.0293, -78.4767);
Resolve Charlottesville to the name and website of its forecast office and the name of its forecast zone
SELECT p.office_id, f.name AS office_name, f.website, p.forecast_zone,
z.name AS zone_name
FROM nws.main.point(38.0293, -78.4767) p,
LATERAL nws.main.office(p.office_id) f,
LATERAL nws.main.zone('forecast', p.forecast_zone) z
ORDER BY p.office_id;
precipitation_anomaly_at (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, metric := VARCHAR, period := VARCHAR)
Read RFC precipitation normals and comparisons with PRISM normals: normal amount, observed departure from normal, or percent of normal. Default all returns three separate metrics. Negative departure indicates a deficit; 100 percent means the normal amount, not a rain probability. Read the published pixels directly, without dividing by a potentially zero normal or inferring the climatological baseline years. Periods use the source's 12Z daily accounting, not local midnight. Different rasters may have different publication times. Raw NoData within a raster becomes NULL; no raster footprint emits no rows. Source valid, issue, file, and retrieval times remain separate. Each overlapping raster is a separate row; use its name and provenance, never sum overlaps. The service is not a historical archive.
Compare the last 30 days of rainfall with published normals
SELECT metric, value, unit, issued_at
FROM nws.main.precipitation_anomaly_at(38.0293,-78.4767)
ORDER BY metric, raster_id;
precipitation_forecast (bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR)
Read WPC quantitative precipitation forecast contour polygons. Values are native liquid-equivalent precipitation contour levels, not exact point estimates. Return all intersecting contours; do not sum overlapping contours or overlapping forecast periods. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published precipitation forecast features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'period': period, 'contour_value': contour_value, 'unit': unit, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.precipitation_forecast(period := 'day1');
precipitation_forecast_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR)
Read WPC quantitative precipitation forecast contour polygons. Values are native liquid-equivalent precipitation contour levels, not exact point estimates. Return all intersecting contours; do not sum overlapping contours or overlapping forecast periods. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the precipitation forecast features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'period': period, 'contour_value': contour_value, 'unit': unit, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.precipitation_forecast_at(38.0293, -78.4767, period := 'day1');
precipitation_observed_at (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, period := VARCHAR)
Sample the latest RFC quantitative precipitation estimate raster at a WGS84 point. Values are estimated observed precipitation in inches, not forecasts or rain-gauge measurements. Period selects the published rolling/calendar accumulation. Native NoData is NULL, zero is retained, and no raster coverage returns no rows. Each overlapping raster remains a separate row: never sum these rows or overlapping periods. issued_at is the source issuance, not an asserted observation interval boundary. Raw pixels are used, never map color/class codes.
Read the latest estimated 24-hour precipitation at Charlottesville
SELECT period, precipitation, unit, issued_at
FROM nws.main.precipitation_observed_at(38.0293, -78.4767)
ORDER BY raster_id;
product (product_id VARCHAR, max_pages := DOUBLE)
Retrieve a text product by its unique identifier, retaining the original bulletin text and issuance metadata.
Retrieve a hazardous weather outlook from its index entry
SELECT d.product_text
FROM nws.main.products('HWO', 'LWX') p,
LATERAL nws.main.product(p.id) d
LIMIT 1;
product_locations (product_type VARCHAR, max_pages := DOUBLE)
Discover issuing locations supporting a given text product type; use these identifiers with products and latest_product.
Find offices issuing Area Forecast Discussions
SELECT office_id, name
FROM nws.main.product_locations('AFD')
ORDER BY office_id;
product_types (max_pages := DOUBLE)
List NWS text product codes and names for discovering discussions, outlooks, summaries, and other bulletins.
Discover fire-weather bulletin types
SELECT code, name
FROM nws.main.product_types()
WHERE name ILIKE '%fire%'
ORDER BY code;
products (product_type VARCHAR, office_id VARCHAR, max_pages := DOUBLE)
List the recent text product index for a product type and issuing location. This is the service's available window, not a complete archive; retrieve text with product(id).
List recent Area Forecast Discussions for Sterling, Virginia
SELECT id, issued_at
FROM nws.main.products('AFD', 'LWX')
ORDER BY issued_at DESC;
rainfall_outlook (bbox := VARCHAR, day := DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read WPC excessive-rainfall outlook polygons and native risk labels. This is a rainfall/flash-flood risk outlook, not a rainfall amount or an active flood warning. No probability is invented from the category code. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published rainfall outlook features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'day': day, 'category': category, 'risk_description': risk_description, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.rainfall_outlook(day := 1);
rainfall_outlook_at (latitude DOUBLE, longitude DOUBLE, day := DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read WPC excessive-rainfall outlook polygons and native risk labels. This is a rainfall/flash-flood risk outlook, not a rainfall amount or an active flood warning. No probability is invented from the category code. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the rainfall outlook features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'day': day, 'category': category, 'risk_description': risk_description, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.rainfall_outlook_at(38.0293, -78.4767, day := 1);
rating_curve (gauge_id VARCHAR, max_pages := DOUBLE, only_tenths := BOOLEAN, row_limit := DOUBLE, sort := VARCHAR)
Read the published NWPS stage-to-discharge rating table with native units. This is a relationship table, not an observed time series or a rating-history archive. Stage is relative to the gauge datum. The API has a limit and no documented offset; possibly_truncated flags a full-limit response. No interpolation, extrapolation, or automatic unit conversion is performed.
Inspect the published stage-discharge rating and its completeness flag
SELECT stage, stage_unit, flow, flow_unit, possibly_truncated
FROM nws.main.rating_curve('RMDV2')
ORDER BY stage;
reach (reach_id VARCHAR, max_pages := DOUBLE)
Retrieve National Water Model reach metadata, available streamflow series, and immediate upstream/downstream reach IDs with stream order. Reach IDs identify model river segments, not gauge stations. Metadata lists potential series; a listed series can currently contain no data.
Discover model streamflow products and connected segments for Deep Creek
SELECT reach_id, name, available_series_json, upstream_json
FROM nws.main.reach('23021904');
reach_streamflow (reach_id VARCHAR, max_pages := DOUBLE, series := VARCHAR)
Read National Water Model streamflow for a reach: analysis_assimilation, short_range, medium_range, long_range, or medium_range_blend. These are model outputs, including the assimilated analysis, not direct gauge measurements. Preserve member and reference_at: ensemble means and members are separate series and must not be summed. Empty upstream products return no rows. Units are retained verbatim.
Find the assimilated National Water Model streamflow peak for a reach by member without mixing units
SELECT member, max(flow) AS peak, flow_unit
FROM nws.main.reach_streamflow('23021904', series := 'analysis_assimilation')
GROUP BY member, flow_unit
ORDER BY member;
river_at_a_glance (gauge_ids VARCHAR, max_pages := DOUBLE)
Read the NWPS River at a Glance view for a bounded list of gauge LIDs. Uses the documented read-only POST endpoint with a rivers array. Retains all original flood statement fields and text; a missing gauge or empty statements is not interpreted as proof of no flood risk. Use stageflow and flood_thresholds for typed measurements and levels.
Read flood statements in the River at a Glance view for Richmond-Westham
SELECT gauge_id, name, flood_statements_json
FROM nws.main.river_at_a_glance('RMDV2')
ORDER BY gauge_id;
river_flood_outlook (bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read the national significant river flooding outlook, with source labels such as Possible, Likely, or Occurring. This general outlook does not enumerate every minor, localized, or flash-flood event. Native issue and validity times are retained. Use gauge/stageflow for location-specific river predictions and alerts for official warnings. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published river flood outlook features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'outlook': outlook, 'product': product, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.river_flood_outlook();
river_flood_outlook_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read the national significant river flooding outlook, with source labels such as Possible, Likely, or Occurring. This general outlook does not enumerate every minor, localized, or flash-flood event. Native issue and validity times are retained. Use gauge/stageflow for location-specific river predictions and alerts for official warnings. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the river flood outlook features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'outlook': outlook, 'product': product, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.river_flood_outlook_at(38.0293, -78.4767);
river_network (gauge_id VARCHAR, direction := VARCHAR, max_pages := DOUBLE)
List upstream and downstream gauge connections reported by NWPS for a starting gauge. This is the service's river-at-a-glance network, not a complete watershed graph. Array position preserves upstream ordering; it does not assert distance or immediate adjacency.
Discover gauges connected to Richmond-Westham along its river network
SELECT direction, gauge_id, name
FROM nws.main.river_network('RMDV2')
ORDER BY direction, sequence_number;
severe_outlook (bbox := VARCHAR, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read SPC categorical and probabilistic convective outlooks. Categorical codes are not percentages; probabilistic contours retain the selected hazard. Overlapping contours remain separate rows. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published severe outlook features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'day': day, 'hazard': hazard, 'category': category, 'probability_pct': probability_pct, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.severe_outlook(day := 1);
severe_outlook_at (latitude DOUBLE, longitude DOUBLE, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read SPC categorical and probabilistic convective outlooks. Categorical codes are not percentages; probabilistic contours retain the selected hazard. Overlapping contours remain separate rows. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the severe outlook features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'day': day, 'hazard': hazard, 'category': category, 'probability_pct': probability_pct, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.severe_outlook_at(38.0293, -78.4767, day := 1);
snow_analysis_at (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, variable := VARCHAR)
Sample NOHRSC analyzed snow depth and snow water equivalent for the conterminous US. These analyses combine model estimates and assimilated observations; these are current snowpack quantities, not new snowfall or forecasts. Native GRIB snow depth is metres and snow water equivalent is kg per square metre. value_mm converts depth to millimetres or water equivalent to millimetres of liquid water (1 kg/m² = 1 mm). Read variable with every value and do not sum depth with water equivalent. Native pixels differ from the inches shown in the map legend. Each variable retains its own valid time. Raw NoData within a raster becomes NULL; no raster footprint emits no rows. Source valid, issue, file, and retrieval times remain separate. Each overlapping raster is a separate row; use its name and provenance, never sum overlaps. The service is not a historical archive.
Inspect current analyzed snow depth and water equivalent near Boulder
SELECT variable, raw_value, raw_unit, value_mm, valid_at
FROM nws.main.snow_analysis_at(40,-105)
ORDER BY variable, raster_id;
soil_moisture_at (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, region := VARCHAR)
Sample National Water Model near-surface soil moisture saturation for the top 40 cm. This is modeled saturation, not volumetric water content, a garden sensor reading, or an irrigation prescription. Native 0–1 fractions are preserved in raw_value and explicitly converted to saturation_pct. Auto checks all four published regional layers and retains their actual coverage. Raw NoData within a raster becomes NULL; no raster footprint emits no rows. Source valid, issue, file, and retrieval times remain separate. Each overlapping raster is a separate row; use its name and provenance, never sum overlaps. The service is not a historical archive.
Inspect modeled near-surface soil saturation at Charlottesville
SELECT region, saturation_pct, soil_depth_cm, valid_at
FROM nws.main.soil_moisture_at(38.0293,-78.4767)
ORDER BY region, raster_id;
space_weather_products (folder := VARCHAR, max_pages := DOUBLE, recursive := BOOLEAN)
Discover current SWPC JSON and text products from the official public directories. Covers geomagnetic indices and forecasts, solar wind, GOES particles/X-rays/magnetometers, aurora models, NOAA scales, alerts, bulletins and solar-cycle products. Directory rows can be passed back as folder; file product_ids can be read with space_weather_rows. Image animation folders are omitted. Files and available durations can change, so use discovery instead of constructing guessed URLs.
Discover current GOES space-weather feeds
SELECT product_id, kind
FROM nws.main.space_weather_products(folder := 'json/goes/primary')
ORDER BY product_id;
space_weather_rows (product_id VARCHAR, max_pages := DOUBLE, page_size := DOUBLE)
Read SWPC data records or original forecast/alert bulletin text. Object arrays emit native records; header-row tables become objects without changing native string/number/null values. NOAA-scale horizon keys remain record_key. Aurora grids emit one longitude/latitude/aurora row with original model timing and format in context_json. No physical units, missing codes or risk category are invented; consult native fields and the product's documentation. Explicit native UTC time_tag and aurora timestamps are exposed when available. Pages retain a source-content fingerprint and fail if the file changes mid-read. This is current published space-weather data, not a comprehensive archive.
Inspect current and forecast NOAA space-weather scales without losing native probabilities
SELECT record_key, record_json
FROM nws.main.space_weather_rows('products/noaa-scales.json')
ORDER BY record_key;
stageflow (gauge_id VARCHAR, max_pages := DOUBLE, product := VARCHAR)
Stream observed and forecast river stage/flow from NWPS. Keep primary and secondary names and units with each value: flow may be cfs or kcfs, and stage is relative to the gauge datum. Only the upstream available window is returned.
Compare available observed and forecast peaks without mixing units
SELECT product, max(primary_value) AS peak, primary_unit
FROM nws.main.stageflow('RMDV2')
GROUP BY product, primary_unit
ORDER BY product;
Compare the RMDV2 forecast crest with the gauge's flood thresholds: the highest category reached (NULL when below action stage), the next category above the crest, and the feet of headroom left
WITH crest AS (SELECT gauge_id, primary_unit, max(primary_value) AS peak_stage FROM nws.main.stageflow('RMDV2', product := 'forecast') GROUP BY gauge_id, primary_unit) SELECT c.gauge_id, c.peak_stage, c.primary_unit AS unit, max_by(t.category, t.stage) FILTER (WHERE t.stage <= c.peak_stage) AS category_reached, min_by(t.category, t.stage) FILTER (WHERE t.stage > c.peak_stage) AS next_category, min(t.stage) FILTER (WHERE t.stage > c.peak_stage) - c.peak_stage AS headroom
FROM crest c
JOIN nws.main.flood_thresholds('RMDV2') t ON t.gauge_id = c.gauge_id AND t.stage_unit = c.primary_unit
GROUP BY c.gauge_id, c.peak_stage, c.primary_unit
ORDER BY c.gauge_id;
| gauge_id | peak_stage | unit | category_reached | next_category | headroom |
|---|---|---|---|---|---|
| RMDV2 | 6.3 | ft | NULL | action | 2.7 |
station (station_id VARCHAR, max_pages := DOUBLE)
Look up an NWS observation station's name, location, elevation, and zone links.
Inspect Charlottesville airport observation station
SELECT station_id, name, elevation_m FROM nws.main.station('KCHO');
stations_at (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE)
List observation stations associated with a point's forecast grid; these are not guaranteed to be ordered by distance or availability.
Discover weather observation stations for a location
SELECT station_id, name, elevation_m
FROM nws.main.stations_at(38.0293, -78.4767)
ORDER BY station_id;
Read the latest observation from the three stations nearest Charlottesville, ranking the point's observation stations by approximate distance in kilometres
SELECT s.station_id, s.name,
round(111.2 * sqrt((s.latitude - 38.0293) ^ 2 + ((s.longitude + 78.4767) * cos(radians(38.0293))) ^ 2), 1) AS distance_km,
o.observed_at, o.temperature_c, o.wind_speed_m_s
FROM nws.main.stations_at(38.0293, -78.4767) s,
LATERAL nws.main.latest_observation(s.station_id) o
ORDER BY distance_km, s.station_id
LIMIT 3;
storm_reports (bbox := VARCHAR, event := VARCHAR, include_geometry := BOOLEAN, lookback_hours := DOUBLE, max_pages := DOUBLE, page_size := DOUBLE, state := VARCHAR)
Read recent NWS Local Storm Reports with locations, native magnitudes/units, and remarks. These are preliminary reports, which may include estimates, corrections, or duplicate observations of the same event; they are not a complete verified event archive. Select one rolling 24/48/72-hour layer; overlapping windows are not additive. Event/state filters apply to each fetched page. No matching reports does not establish that no event occurred. Optionally restrict by WGS84 bbox, including dateline-crossing bounds; empty bbox scans the selected layer.
Count recent local storm reports by event type
SELECT event, count(*) AS reports
FROM nws.main.storm_reports(lookback_hours := 72)
GROUP BY event
ORDER BY event;
storm_reports_near (latitude DOUBLE, longitude DOUBLE, event := VARCHAR, include_geometry := BOOLEAN, lookback_hours := DOUBLE, max_pages := DOUBLE, page_size := DOUBLE, radius_km := DOUBLE, state := VARCHAR)
Read recent NWS Local Storm Reports with locations, native magnitudes/units, and remarks. These are preliminary reports, which may include estimates, corrections, or duplicate observations of the same event; they are not a complete verified event archive. Select one rolling 24/48/72-hour layer; overlapping windows are not additive. Event/state filters apply to each fetched page. No matching reports does not establish that no event occurred. Geographic bounds are followed by an exact great-circle radius filter, including dateline and polar locations. Order by distance_km for nearest reports.
Count the storm reports within 500 km of Charlottesville over the past 72 hours, list their event types and the nearest distance; 0 reports means nothing was reported nearby
SELECT count(*) AS reports, list(DISTINCT event ORDER BY event) AS events,
min(distance_km) AS nearest_km, max(reported_at) AS latest_report
FROM nws.main.storm_reports_near(38.0293, -78.4767, radius_km := 500, lookback_hours := 72);
tropical_features (bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, product := VARCHAR)
Read NHC/CPHC tropical development areas, forecast tracks/points/cones, watches and warnings, past tracks, wind radii/swaths, wind arrival contours, wind probability contours, peak storm surge features and coastal breakpoints. Resolve current layer IDs by exact source names. Native attributes retain product-specific units, probability ranges, wind thresholds, advisory identifiers and time wording; shared storm/advisory fields are exposed where present. A wallet is a reusable source slot, not a permanent cyclone ID. The cone describes track uncertainty, not the entire impact area; wind/probability contours overlap and must not be summed. Empty active-storm layers are legitimate. For surge inundation/tidal-mask pixels and static surge-risk scenarios, discover Mosaic Layers using map_layers and read with map_raster_at; static scenario maps are not live storm forecasts.
List the NHC coastal watch and warning breakpoints with their original name, position and state fields
SELECT object_id, attributes_json
FROM nws.main.tropical_features(product := 'breakpoints')
ORDER BY object_id;
tropical_features_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, product := VARCHAR)
Read NHC/CPHC tropical development areas, forecast tracks/points/cones, watches and warnings, past tracks, wind radii/swaths, wind arrival contours, wind probability contours, peak storm surge features and coastal breakpoints. Resolve current layer IDs by exact source names. Native attributes retain product-specific units, probability ranges, wind thresholds, advisory identifiers and time wording; shared storm/advisory fields are exposed where present. A wallet is a reusable source slot, not a permanent cyclone ID. The cone describes track uncertainty, not the entire impact area; wind/probability contours overlap and must not be summed. Empty active-storm layers are legitimate. For surge inundation/tidal-mask pixels and static surge-risk scenarios, discover Mosaic Layers using map_layers and read with map_raster_at; static scenario maps are not live storm forecasts.
Count the tropical forecast cones covering Miami and list their storms and advisories; 0 features means no active storm's cone covers the point
SELECT count(*) AS features,
list({'storm_name': storm_name, 'advisory_number': advisory_number, 'attributes_json': attributes_json} ORDER BY object_id) AS details
FROM nws.main.tropical_features_at(25.76, -80.19);
weather_hazards (bbox := VARCHAR, hazard_group := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR)
Read WPC/CPC days 3–7 or 8–14 weather-hazard outlooks. Native layer groups include temperature, precipitation, and wildfire/drought; the temperature group can also contain high winds, so interpret each hazard label. Labels are not invented probabilities or active warnings. Native start/end dates are retained at source precision; date-only end dates are inclusive. NoArea placeholder features are omitted. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published weather hazards features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'period': period, 'hazard_group': hazard_group, 'hazard': hazard, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.weather_hazards();
weather_hazards_at (latitude DOUBLE, longitude DOUBLE, hazard_group := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR)
Read WPC/CPC days 3–7 or 8–14 weather-hazard outlooks. Native layer groups include temperature, precipitation, and wildfire/drought; the temperature group can also contain high winds, so interpret each hazard label. Labels are not invented probabilities or active warnings. Native start/end dates are retained at source precision; date-only end dates are inclusive. NoArea placeholder features are omitted. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the weather hazards features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'period': period, 'hazard_group': hazard_group, 'hazard': hazard, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.weather_hazards_at(38.0293, -78.4767);
weather_stories (office_id VARCHAR, max_pages := DOUBLE)
Read an office's weather story metadata and image download links without downloading binary assets.
Find current local weather story graphics
SELECT title, download_url FROM nws.main.weather_stories('LWX');
winter_precipitation (bbox := VARCHAR, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, threshold_inches := DOUBLE)
Read WPC day 1–3 snow and ice accumulation probability bands. Snow thresholds are 4, 8, or 12 inches; ice uses 0.25 inches. The service names snow thresholds 'at least' while source product text says 'greater than'; both texts are retained. Bands are not exact point probabilities. Snow depth and ice accumulation are not liquid-equivalent rainfall. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published winter precipitation features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'hazard': hazard, 'threshold_inches': threshold_inches, 'category': category, 'probability_min_pct': probability_min_pct, 'probability_max_pct': probability_max_pct, 'valid_from': valid_from} ORDER BY object_id) AS details
FROM nws.main.winter_precipitation(day := 1);
winter_precipitation_at (latitude DOUBLE, longitude DOUBLE, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, threshold_inches := DOUBLE)
Read WPC day 1–3 snow and ice accumulation probability bands. Snow thresholds are 4, 8, or 12 inches; ice uses 0.25 inches. The service names snow thresholds 'at least' while source product text says 'greater than'; both texts are retained. Bands are not exact point probabilities. Snow depth and ice accumulation are not liquid-equivalent rainfall. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the winter precipitation features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'hazard': hazard, 'threshold_inches': threshold_inches, 'category': category, 'probability_min_pct': probability_min_pct, 'probability_max_pct': probability_max_pct, 'valid_from': valid_from} ORDER BY object_id) AS details
FROM nws.main.winter_precipitation_at(38.0293, -78.4767, day := 1);
winter_storm_probability (bbox := VARCHAR, component := VARCHAR, forecast_hour := DOUBLE, impact := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read WPC probabilistic Winter Storm Severity Index contours for a selected impact threshold and component. Native probability contour percentages are retained; they are not exact interpolated point probabilities. forecast_hour selects a published rolling 24-hour window ending at lead 24–168 hours in six-hour increments; zero returns every published window. Read valid_from and valid_to instead of assuming local calendar days. Overlapping probability contours and forecast periods must not be summed. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published winter storm probability features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'forecast_hour': forecast_hour, 'component': component, 'impact': impact, 'probability_pct': probability_pct, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.winter_storm_probability();
winter_storm_probability_at (latitude DOUBLE, longitude DOUBLE, component := VARCHAR, forecast_hour := DOUBLE, impact := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE)
Read WPC probabilistic Winter Storm Severity Index contours for a selected impact threshold and component. Native probability contour percentages are retained; they are not exact interpolated point probabilities. forecast_hour selects a published rolling 24-hour window ending at lead 24–168 hours in six-hour increments; zero returns every published window. Read valid_from and valid_to instead of assuming local calendar days. Overlapping probability contours and forecast periods must not be summed. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the winter storm probability features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'forecast_hour': forecast_hour, 'component': component, 'impact': impact, 'probability_pct': probability_pct, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.winter_storm_probability_at(38.0293, -78.4767);
winter_storm_severity (bbox := VARCHAR, component := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR)
Read WPC Winter Storm Severity Index (WSSI) impact polygons for day 1, 2, 3, or days 1–3, overall or by component. Categories describe potential societal impacts, not probabilities, snow amounts, or official warnings. Overall is the maximum component impact; do not sum components. All published intersecting areas are retained. Optionally restrict results with bbox; intersecting polygons are returned without clipping.
Count the published winter storm severity features and list their original categories or units; 0 features and NULL details mean none is currently published
SELECT count(*) AS features,
list({'period': period, 'component': component, 'impact': impact, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.winter_storm_severity(period := 'day1_3');
winter_storm_severity_at (latitude DOUBLE, longitude DOUBLE, component := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR)
Read WPC Winter Storm Severity Index (WSSI) impact polygons for day 1, 2, 3, or days 1–3, overall or by component. Categories describe potential societal impacts, not probabilities, snow amounts, or official warnings. Overall is the maximum component impact; do not sum components. All published intersecting areas are retained. Returns every polygon intersecting the point, including boundaries; no match means no published intersecting feature, not a guarantee of no hazard.
Count the winter storm severity features covering Charlottesville and list their original categories or units; 0 features and NULL details mean no published area covers the point
SELECT count(*) AS features,
list({'period': period, 'component': component, 'impact': impact, 'valid_from': valid_from, 'valid_to': valid_to} ORDER BY object_id) AS details
FROM nws.main.winter_storm_severity_at(38.0293, -78.4767, period := 'day1_3');
zone (zone_type VARCHAR, zone_id VARCHAR, max_pages := DOUBLE)
Retrieve an NWS zone boundary as GeoJSON. Use affected_zones_json from alerts to resolve alerts whose own geometry is NULL.
Retrieve the forecast zone boundary for Albemarle County
SELECT name, geometry_json FROM nws.main.zone('forecast', 'VAZ037');
zones (zone_type VARCHAR, max_pages := DOUBLE, state := VARCHAR)
List NWS zone metadata, optionally filtered by state. Index geometry may be absent; use zone(type, id) for a boundary.
Discover Virginia fire-weather zones
SELECT zone_id, name
FROM nws.main.zones('fire', state := 'VA')
ORDER BY zone_id;
Try these queries
Read the latest observation from the three stations nearest Charlottesville, ranking the point's observation stations by approximate distance in kilometres
SELECT s.station_id, s.name,
round(111.2 * sqrt((s.latitude - 38.0293) ^ 2 + ((s.longitude + 78.4767) * cos(radians(38.0293))) ^ 2), 1) AS distance_km,
o.observed_at, o.temperature_c, o.wind_speed_m_s
FROM nws.main.stations_at(38.0293, -78.4767) s,
LATERAL nws.main.latest_observation(s.station_id) o
ORDER BY distance_km, s.station_id
LIMIT 3
Resolve Charlottesville to the name and website of its forecast office and the name of its forecast zone
SELECT p.office_id, f.name AS office_name, f.website, p.forecast_zone,
z.name AS zone_name
FROM nws.main.point(38.0293, -78.4767) p,
LATERAL nws.main.office(p.office_id) f,
LATERAL nws.main.zone('forecast', p.forecast_zone) z
ORDER BY p.office_id
Review active weather hazards in Virginia
SELECT event, severity, headline, expires
FROM nws.main.alerts(area := 'VA')
ORDER BY sent DESC
Uses alerts
Count the alerts that covered a garden in Charlottesville over the past week and list their event names; 0 alerts means no alert covered the point
SELECT count(*) AS alerts, list(DISTINCT event ORDER BY event) AS events,
max(sent) AS latest_sent
FROM nws.main.alerts_at(38.0293, -78.4767, active := false)
Uses alerts_at
Discover freeze-related alert event names
SELECT event
FROM nws.main.alert_types()
WHERE event ILIKE '%freeze%'
ORDER BY event
Uses alert_types
Inspect Charlottesville airport observation station
SELECT station_id, name, elevation_m FROM nws.main.station('KCHO')
Uses station
89 more examples in the Catalog, each listed under the table or function it uses.
Questions it can answer
Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.
- Using the nws worker, Find the forecast office and zone serving Charlottesville, Virginia.
- Using the nws worker, Review active weather hazards in Virginia.
- Using the nws worker, Read full details for current Virginia alert identifiers.
- Using the nws worker, Discover freeze-related alert event names.
- Using the nws worker, Discover weather observation stations for a location.
- Using the nws worker, Inspect Charlottesville airport observation station.
NWS is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.
Related workers
Open-Meteo
Weather, ocean & earth
Open-Meteo weather — forecasts, history, air quality, marine, flood and climate data
Buoys
Weather, ocean & earth
NOAA NDBC buoy stations, latest observations and recent station histories for marine analysis
Hydrology
Weather, ocean & earth
Upstream catchments and land-cover summaries for monitoring stations