Skip to content

NWS

Explore US weather alerts, observations, forecast grids, bulletins, and river conditions

Connector software
Free and open source
Service credentials
Not needed
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
Result
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.

setup.sql
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;

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'
);

3. Run a query

query.sql
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
More example queries →
Technical details
Verified connector release
v0.6.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
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]'
);

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.

Catalog

Everything nws exposes once attached — read straight from the worker's released build.

nws 1 schema
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)
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;
Result
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;
Table functions
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) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude, -90 to 90; NULL emits no rows.
longitude DOUBLE
WGS84 longitude, -180 to 180; NULL emits no rows.
Named arguments
bias_corrected := BOOLEAN
Select the separately published bias-corrected PM2.5 or ozone product; unsupported for smoke/dust. · default false
end_time := VARCHAR
Optional RFC3339 UTC/timezone exclusive end; must follow start_time. · default ""
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Raster catalog records per page, 1–20; reduced to the service's mosaic limit. All pages are read unless max_pages is reached. · default 20
product := VARCHAR
Air-quality product selector; PM2.5/ozone averages and daily maxima, surface/column smoke, or surface/column dust. · default "pm25_1h"
start_time := VARCHAR
Optional RFC3339 UTC/timezone start. Return native validity intervals intersecting the requested half-open window. · default ""
subset := VARCHAR
Optional exact idp_subset label from the source catalog. Empty includes all geographic/product subsets covering the point. · default ""
Returns columns
product VARCHAR
Requested air-quality variant.
pollutant VARCHAR
PM2.5, ozone, smoke or dust.
statistic VARCHAR
Mean, daily maximum, surface concentration or column integral.
averaging_hours DOUBLE
Averaging period identified by the product selector; NULL where unspecified. Read interpretation_note for source inconsistencies.
bias_corrected BOOLEAN
Whether the bias-corrected source product was requested.
value DOUBLE
Native concentration/integral pixel, without conversion or AQI calculation.
unit VARCHAR
Source-described ug m-3 or ppb; NULL for ambiguous smoke/column units.
source_description VARCHAR
Original service description, including source unit/averaging claims.
interpretation_note VARCHAR
Known source interpretation caveats; NULL if none identified.
product_id VARCHAR
Selected ImageServer product ID.
latitude DOUBLE
Requested WGS84 latitude.
longitude DOUBLE
Requested WGS84 longitude.
raster_id DOUBLE
Source raster object ID; not stable across publications.
raster_name VARCHAR
Native raster name, if supplied.
subset VARCHAR
Native regional/product subset.
band_index DOUBLE
One-based band index; preserve this for multiband display imagery.
raw_value DOUBLE
Native nearest-neighbor band value; NULL for NoData. May be a display color rather than a physical measurement.
pixel_text VARCHAR
Original complete pixel string, including all bands.
valid_from TIMESTAMP WITH TIME ZONE
UTC native raster valid start; no period is invented.
valid_to TIMESTAMP WITH TIME ZONE
UTC native raster valid end; may equal the start for instantaneous products.
issued_at TIMESTAMP WITH TIME ZONE
UTC native reference/issue time, if supplied.
forecast_hour DOUBLE
Native forecast lead hour, if supplied.
source_file_at TIMESTAMP WITH TIME ZONE
UTC native source file timestamp.
ingested_at TIMESTAMP WITH TIME ZONE
UTC native ingestion timestamp.
attributes_json VARCHAR
Original raster catalog attributes.
sample_json VARCHAR
Original pixel sample and metadata.
metadata_url VARCHAR
Canonical raster catalog query URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
alert (alert_id VARCHAR, max_pages := DOUBLE) 1 example

Retrieve one NWS alert message by its full identifier, including its original text and referenced messages.

Positional arguments
alert_id VARCHAR
alert id supplied per input row; NULL produces no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
id VARCHAR
id as published by NWS.
event VARCHAR
event as published by NWS.
headline VARCHAR
headline as published by NWS.
description VARCHAR
description as published by NWS.
instruction VARCHAR
instruction as published by NWS.
severity VARCHAR
severity as published by NWS.
certainty VARCHAR
certainty as published by NWS.
urgency VARCHAR
urgency as published by NWS.
status VARCHAR
status as published by NWS.
message_type VARCHAR
message type as published by NWS.
response VARCHAR
response as published by NWS.
sender_name VARCHAR
sender name as published by NWS.
area_desc VARCHAR
area desc as published by NWS.
sent TIMESTAMP WITH TIME ZONE
UTC alert sent time; NULL when unspecified.
effective TIMESTAMP WITH TIME ZONE
UTC alert effective time; NULL when unspecified.
onset TIMESTAMP WITH TIME ZONE
UTC alert onset time; NULL when unspecified.
expires TIMESTAMP WITH TIME ZONE
UTC alert expires time; NULL when unspecified.
ends TIMESTAMP WITH TIME ZONE
UTC alert ends time; NULL when unspecified.
geometry_json VARCHAR
GeoJSON geometry, or NULL for zone-based alerts; NULL does not mean no affected area.
affected_zones_json VARCHAR
JSON array of NWS zone URLs describing the affected area.
geocode_json VARCHAR
JSON object containing SAME and UGC codes.
parameters_json VARCHAR
JSON alert parameters including VTEC and AWIPS identifiers when provided.
references_json VARCHAR
JSON references to earlier alert messages, including updates and cancellations.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
alert_types (max_pages := DOUBLE) 1 example

List event names supported by the NWS alerts API for use in the event filter.

Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
event VARCHAR
Exact alert event name accepted by the API.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Discover freeze-related alert event names

SELECT event
FROM nws.main.alert_types()
WHERE event ILIKE '%freeze%'
ORDER BY event;
Link
alerts (active := BOOLEAN, area := VARCHAR, end_time := VARCHAR, event := VARCHAR, max_pages := DOUBLE, start_time := VARCHAR, zone := VARCHAR) 1 example

Stream active or recent NWS alerts, including zone-based warnings, original text, VTEC parameters, and update references.

Named arguments
active := BOOLEAN
Read currently active alerts; false uses the recent /alerts archive (approximately seven days). · default true
area := VARCHAR
Comma-separated uppercase NWS area codes, such as VA or VA,MD; mutually exclusive with zone. · default ""
end_time := VARCHAR
RFC3339 end time with timezone; only allowed with active := false. · default ""
event := VARCHAR
Exact event name, such as Freeze Warning; empty means all event types. · default ""
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
start_time := VARCHAR
RFC3339 start time with timezone; only allowed with active := false. · default ""
zone := VARCHAR
Forecast or county zone ID such as VAZ037; mutually exclusive with area. · default ""
Returns columns
id VARCHAR
id as published by NWS.
event VARCHAR
event as published by NWS.
headline VARCHAR
headline as published by NWS.
description VARCHAR
description as published by NWS.
instruction VARCHAR
instruction as published by NWS.
severity VARCHAR
severity as published by NWS.
certainty VARCHAR
certainty as published by NWS.
urgency VARCHAR
urgency as published by NWS.
status VARCHAR
status as published by NWS.
message_type VARCHAR
message type as published by NWS.
response VARCHAR
response as published by NWS.
sender_name VARCHAR
sender name as published by NWS.
area_desc VARCHAR
area desc as published by NWS.
sent TIMESTAMP WITH TIME ZONE
UTC alert sent time; NULL when unspecified.
effective TIMESTAMP WITH TIME ZONE
UTC alert effective time; NULL when unspecified.
onset TIMESTAMP WITH TIME ZONE
UTC alert onset time; NULL when unspecified.
expires TIMESTAMP WITH TIME ZONE
UTC alert expires time; NULL when unspecified.
ends TIMESTAMP WITH TIME ZONE
UTC alert ends time; NULL when unspecified.
geometry_json VARCHAR
GeoJSON geometry, or NULL for zone-based alerts; NULL does not mean no affected area.
affected_zones_json VARCHAR
JSON array of NWS zone URLs describing the affected area.
geocode_json VARCHAR
JSON object containing SAME and UGC codes.
parameters_json VARCHAR
JSON alert parameters including VTEC and AWIPS identifiers when provided.
references_json VARCHAR
JSON references to earlier alert messages, including updates and cancellations.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Review active weather hazards in Virginia

SELECT event, severity, headline, expires
FROM nws.main.alerts(area := 'VA')
ORDER BY sent DESC;
Link
alerts_at (latitude DOUBLE, longitude DOUBLE, active := BOOLEAN, end_time := VARCHAR, event := VARCHAR, max_pages := DOUBLE, start_time := VARCHAR) 1 example

Find active or recent alerts affecting a point using NWS's point filter, which includes alerts defined by zones without polygons.

Positional arguments
latitude DOUBLE
Latitude in decimal degrees, −90 to 90. NWS coverage is limited to its US service areas.
longitude DOUBLE
Longitude in decimal degrees, −180 to 180; west is negative.
Named arguments
active := BOOLEAN
Read currently active alerts; false uses the recent /alerts archive (approximately seven days). · default true
end_time := VARCHAR
RFC3339 end time with timezone; only allowed with active := false. · default ""
event := VARCHAR
Exact event name, such as Freeze Warning; empty means all event types. · default ""
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
start_time := VARCHAR
RFC3339 start time with timezone; only allowed with active := false. · default ""
Returns columns
id VARCHAR
id as published by NWS.
event VARCHAR
event as published by NWS.
headline VARCHAR
headline as published by NWS.
description VARCHAR
description as published by NWS.
instruction VARCHAR
instruction as published by NWS.
severity VARCHAR
severity as published by NWS.
certainty VARCHAR
certainty as published by NWS.
urgency VARCHAR
urgency as published by NWS.
status VARCHAR
status as published by NWS.
message_type VARCHAR
message type as published by NWS.
response VARCHAR
response as published by NWS.
sender_name VARCHAR
sender name as published by NWS.
area_desc VARCHAR
area desc as published by NWS.
sent TIMESTAMP WITH TIME ZONE
UTC alert sent time; NULL when unspecified.
effective TIMESTAMP WITH TIME ZONE
UTC alert effective time; NULL when unspecified.
onset TIMESTAMP WITH TIME ZONE
UTC alert onset time; NULL when unspecified.
expires TIMESTAMP WITH TIME ZONE
UTC alert expires time; NULL when unspecified.
ends TIMESTAMP WITH TIME ZONE
UTC alert ends time; NULL when unspecified.
geometry_json VARCHAR
GeoJSON geometry, or NULL for zone-based alerts; NULL does not mean no affected area.
affected_zones_json VARCHAR
JSON array of NWS zone URLs describing the affected area.
geocode_json VARCHAR
JSON object containing SAME and UGC codes.
parameters_json VARCHAR
JSON alert parameters including VTEC and AWIPS identifiers when provided.
references_json VARCHAR
JSON references to earlier alert messages, including updates and cancellations.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
api_endpoints (max_pages := DOUBLE, service := VARCHAR) 1 example

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.

Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
service := VARCHAR
Official specification: weather, water or aviation. · default "weather"
Returns columns
service VARCHAR
API service.
operation_id VARCHAR
Input to api_rows.
path VARCHAR
Public GET route template.
description VARCHAR
Official operation summary and description.
parameters_json VARCHAR
Parameter descriptors, including path/query placement and constraints.
response_format VARCHAR
json or text.
deprecated BOOLEAN
Whether the source marks this operation deprecated.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
api_rows (service VARCHAR, operation_id VARCHAR, parameters_json VARCHAR, max_pages := DOUBLE) 1 example

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.

Positional arguments
service VARCHAR
weather, water or aviation; NULL emits no rows.
operation_id VARCHAR
Exact operation ID from api_endpoints; NULL emits no rows.
parameters_json VARCHAR
JSON object using the operation's published parameter names. Required path/query values must be provided; unknown keys, invalid types and unsupported formats fail. Arrays use JSON arrays. NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
service VARCHAR
weather, water, or aviation.
operation_id VARCHAR
Operation from api_endpoints.
row_index DOUBLE
Zero-based position within this upstream page, not a persistent record ID.
record_id VARCHAR
Native record identifier when present; NULL otherwise.
record_json VARCHAR
Complete native JSON record, retaining nested quantities, units, dates and missing values.
properties_json VARCHAR
GeoJSON properties if present.
geometry_json VARCHAR
Native geometry if present. Consult the source CRS; no reprojection is inferred.
text VARCHAR
Original text for text-only aviation products; NULL for JSON.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
beach_forecast (bbox := VARCHAR, day := DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
day := DOUBLE
Beach forecast day 1 or 2 from the current source cycle. · default 1
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
day DOUBLE
Selected source forecast day.
office_id VARCHAR
Issuing office identifier.
beach_name VARCHAR
Source beach or forecast area name.
has_forecast BOOLEAN
Source contains a non-placeholder product date.
product_date_text VARCHAR
Native product date text.
product_time_text VARCHAR
Native product time text, preserving timezone wording.
period_text VARCHAR
Native forecast period description.
rip_current_risk VARCHAR
Source rip-current or swim-risk wording.
surf_text VARCHAR
Surf height/range with native units.
water_temperature_text VARCHAR
Water temperature with native units.
uv_text VARCHAR
Published UV information.
maximum_temperature_text VARCHAR
Maximum air temperature with native units.
weather_text VARCHAR
Weather forecast wording.
wind_text VARCHAR
Wind forecast wording.
thunderstorm_text VARCHAR
Thunderstorm forecast wording.
waterspout_text VARCHAR
Waterspout forecast wording.
product_url VARCHAR
Source bulletin link; returned without fetching arbitrary linked URLs.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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();
Link
beach_forecast_at (latitude DOUBLE, longitude DOUBLE, day := DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
day := DOUBLE
Beach forecast day 1 or 2 from the current source cycle. · default 1
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
day DOUBLE
Selected source forecast day.
office_id VARCHAR
Issuing office identifier.
beach_name VARCHAR
Source beach or forecast area name.
has_forecast BOOLEAN
Source contains a non-placeholder product date.
product_date_text VARCHAR
Native product date text.
product_time_text VARCHAR
Native product time text, preserving timezone wording.
period_text VARCHAR
Native forecast period description.
rip_current_risk VARCHAR
Source rip-current or swim-risk wording.
surf_text VARCHAR
Surf height/range with native units.
water_temperature_text VARCHAR
Water temperature with native units.
uv_text VARCHAR
Published UV information.
maximum_temperature_text VARCHAR
Maximum air temperature with native units.
weather_text VARCHAR
Weather forecast wording.
wind_text VARCHAR
Wind forecast wording.
thunderstorm_text VARCHAR
Thunderstorm forecast wording.
waterspout_text VARCHAR
Waterspout forecast wording.
product_url VARCHAR
Source bulletin link; returned without fetching arbitrary linked URLs.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
briefing (office_id VARCHAR, max_pages := DOUBLE) 1 example

Read the current office briefing metadata and document link; no active briefing produces zero rows.

Positional arguments
office_id VARCHAR
office id supplied per input row; NULL produces no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
office_id VARCHAR
Issuing office.
title VARCHAR
Briefing or story title.
description VARCHAR
Published description.
start_time TIMESTAMP WITH TIME ZONE
UTC start of applicability.
end_time TIMESTAMP WITH TIME ZONE
UTC end of applicability.
updated_at TIMESTAMP WITH TIME ZONE
UTC update time.
download_url VARCHAR
Published document or image link; content is not downloaded.
alt_text VARCHAR
Image alternative text when supplied.
priority DOUBLE
Upstream display priority.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Find the current local weather briefing document

SELECT title, download_url FROM nws.main.briefing('LWX');
Link
buoy_measurements (station_id VARCHAR, end_time := VARCHAR, max_pages := DOUBLE, page_size := DOUBLE, product := VARCHAR, start_time := VARCHAR, variable := VARCHAR) 1 example

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.

Positional arguments
station_id VARCHAR
NDBC station identifier from buoy_stations or buoy_products, case-insensitive; NULL emits no rows.
Named arguments
end_time := VARCHAR
Optional RFC3339 exclusive observation time. · default ""
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Source observation lines per batch, 1–1000; each line may emit multiple variable or spectral-bin rows. · default 100
product := VARCHAR
Native product suffix: txt, spec, data_spec, swdir, swdir2, swr1, swr2, ocean, supl, adcp, dart, rain, srad, cwind, drift. · default "txt"
start_time := VARCHAR
Optional RFC3339 inclusive observation time. · default ""
variable := VARCHAR
Optional exact native variable name; empty returns every measurement. · default ""
Returns columns
station_id VARCHAR
NDBC station ID.
product VARCHAR
Native realtime filename suffix.
record_index DOUBLE
Zero-based line in this source file; not a permanent ID.
observed_at TIMESTAMP WITH TIME ZONE
UTC observation timestamp from the source date/time columns.
variable VARCHAR
Native column name or spectral component.
value DOUBLE
Numeric value in native units; NULL for missing or nonnumeric categorical text.
value_text VARCHAR
Original token, retaining missing codes and categorical information.
unit VARCHAR
Native header unit, or documented spectral unit; NULL when unspecified.
is_missing BOOLEAN
Recognized source missing token; a nonnumeric category is not automatically missing.
frequency_hz DOUBLE
Frequency for a spectral bin; NULL for ordinary columns and separation frequency.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
buoy_products (station_id VARCHAR, max_pages := DOUBLE) 1 example

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.

Positional arguments
station_id VARCHAR
NDBC station identifier from buoy_stations or buoy_products, case-insensitive; NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
station_id VARCHAR
Requested station ID.
product VARCHAR
Native file suffix.
supported BOOLEAN
Whether buoy_measurements currently parses this format.
data_url VARCHAR
Canonical data file URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Find currently published products for an offshore buoy

SELECT product, supported, data_url
FROM nws.main.buoy_products('44014')
ORDER BY product;
Link
buoy_stations (max_pages := DOUBLE) 1 example

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.

Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
station_id VARCHAR
NDBC station ID.
name VARCHAR
Station name.
latitude DOUBLE
WGS84 latitude.
longitude DOUBLE
WGS84 longitude.
elevation_m DOUBLE
Site elevation above mean sea level in metres when supplied.
owner VARCHAR
Station owner.
program VARCHAR
Source program.
station_type VARCHAR
Native platform type.
meteorology BOOLEAN
Source meteorological data flag.
currents BOOLEAN
Source current data flag.
water_quality BOOLEAN
Source water-quality flag.
dart BOOLEAN
Source DART flag.
attributes_json VARCHAR
All original station XML attributes.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Discover active marine observation stations

SELECT station_id, name, latitude, longitude
FROM nws.main.buoy_stations()
WHERE meteorology
ORDER BY station_id;
Link
climate_outlook (bbox := VARCHAR, include_geometry := BOOLEAN, lead := DOUBLE, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR, variable := VARCHAR) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
lead := DOUBLE
Seasonal layer index 1–13, each a successive three-month window. Must be 1 for other periods. · default 1
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
period := VARCHAR
CPC lead window: 6_10_day, 8_14_day, monthly, or seasonal. · default "8_14_day"
variable := VARCHAR
CPC variable: temperature or precipitation. · default "temperature"
Returns columns
period VARCHAR
Selected lead window.
lead DOUBLE
Seasonal layer index 1–13; NULL for non-seasonal periods.
target_period VARCHAR
Native monthly or three-month seasonal target label, including its year(s).
variable VARCHAR
Temperature or precipitation.
category VARCHAR
Native CPC category label relative to climatological normal.
probability_pct DOUBLE
Published category probability contour in percent; not chance of precipitation.
forecast_date TIMESTAMP WITH TIME ZONE
Forecast date at midnight UTC; no precise issue time is asserted.
valid_from TIMESTAMP WITH TIME ZONE
First valid date at midnight UTC.
valid_to TIMESTAMP WITH TIME ZONE
Last valid date at midnight UTC, inclusive; not an exclusive interval boundary.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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');
Link
climate_outlook_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, lead := DOUBLE, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR, variable := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
lead := DOUBLE
Seasonal layer index 1–13, each a successive three-month window. Must be 1 for other periods. · default 1
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
period := VARCHAR
CPC lead window: 6_10_day, 8_14_day, monthly, or seasonal. · default "8_14_day"
variable := VARCHAR
CPC variable: temperature or precipitation. · default "temperature"
Returns columns
period VARCHAR
Selected lead window.
lead DOUBLE
Seasonal layer index 1–13; NULL for non-seasonal periods.
target_period VARCHAR
Native monthly or three-month seasonal target label, including its year(s).
variable VARCHAR
Temperature or precipitation.
category VARCHAR
Native CPC category label relative to climatological normal.
probability_pct DOUBLE
Published category probability contour in percent; not chance of precipitation.
forecast_date TIMESTAMP WITH TIME ZONE
Forecast date at midnight UTC; no precise issue time is asserted.
valid_from TIMESTAMP WITH TIME ZONE
First valid date at midnight UTC.
valid_to TIMESTAMP WITH TIME ZONE
Last valid date at midnight UTC, inclusive; not an exclusive interval boundary.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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');
Link
drought_outlook (bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
period := VARCHAR
Drought outlook period: monthly or seasonal. · default "monthly"
Returns columns
period VARCHAR
Requested outlook period.
category VARCHAR
Original drought outlook category, including No_Drought when supplied.
forecast_date TIMESTAMP WITH TIME ZONE
Published forecast date at midnight UTC, with day precision.
target_period VARCHAR
Verbatim target period; may omit the year.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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');
Link
drought_outlook_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
period := VARCHAR
Drought outlook period: monthly or seasonal. · default "monthly"
Returns columns
period VARCHAR
Requested outlook period.
category VARCHAR
Original drought outlook category, including No_Drought when supplied.
forecast_date TIMESTAMP WITH TIME ZONE
Published forecast date at midnight UTC, with day precision.
target_period VARCHAR
Verbatim target period; may omit the year.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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');
Link
fire_outlook (bbox := VARCHAR, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
day := DOUBLE
Forecast day counted from the latest product cycle; availability depends on the selected product. · default 1
hazard := VARCHAR
Fire-weather product: wind_rh or dry_thunderstorm. · default "wind_rh"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
day DOUBLE
Forecast day.
hazard VARCHAR
Selected fire-weather product.
category VARCHAR
Published risk label or the documented name of its native category code.
category_code DOUBLE
Native GIS category code. This is not necessarily a probability or common severity scale.
probability_pct DOUBLE
Day 3–8 native probability fraction multiplied by 100; NULL for categorical products and no delineated area.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
fire_outlook_at (latitude DOUBLE, longitude DOUBLE, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
day := DOUBLE
Forecast day counted from the latest product cycle; availability depends on the selected product. · default 1
hazard := VARCHAR
Fire-weather product: wind_rh or dry_thunderstorm. · default "wind_rh"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
day DOUBLE
Forecast day.
hazard VARCHAR
Selected fire-weather product.
category VARCHAR
Published risk label or the documented name of its native category code.
category_code DOUBLE
Native GIS category code. This is not necessarily a probability or common severity scale.
probability_pct DOUBLE
Day 3–8 native probability fraction multiplied by 100; NULL for categorical products and no delineated area.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
flash_flood_guidance_at (latitude DOUBLE, longitude DOUBLE, hours := DOUBLE, max_pages := DOUBLE) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude from -90 to 90; NULL emits no rows.
longitude DOUBLE
WGS84 longitude from -180 to 180; NULL emits no rows.
Named arguments
hours := DOUBLE
Rainfall accumulation duration: 1, 3, 6, or regional 12 hours. · default 3
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
hours DOUBLE
Guidance rainfall duration.
raw_value DOUBLE
Native FFLDG rainfall mass per unit area.
raw_unit VARCHAR
kg m-2; 1 kg/m² of liquid water equals 1 mm.
threshold_mm DOUBLE
Estimated rainfall threshold in millimetres.
threshold_inches DOUBLE
Estimated rainfall threshold in inches, converted by dividing millimetres by 25.4.
latitude DOUBLE
Requested WGS84 latitude.
longitude DOUBLE
Requested WGS84 longitude.
layer_name VARCHAR
Exact upstream mosaic layer name, including any source whitespace.
raster_id DOUBLE
Source raster object ID, not stable across publications.
raster_name VARCHAR
Native raster dataset name.
valid_at TIMESTAMP WITH TIME ZONE
UTC raster valid time when the source provides it; NULL otherwise.
issued_at TIMESTAMP WITH TIME ZONE
UTC source issuance time, not an invented observation interval boundary.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp.
ingested_at TIMESTAMP WITH TIME ZONE
UTC GIS ingestion timestamp.
attributes_json VARCHAR
Original identify attributes, preserving raw pixels and display class codes.
footprint_json VARCHAR
Original raster footprint metadata and publication fields.
metadata_url VARCHAR
Canonical footprint metadata query URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
flood_impacts (gauge_id VARCHAR, max_pages := DOUBLE) 1 example

Read published local flood impact statements at specific gauge stages. These describe consequences at the gauge's datum, not a flood inundation map.

Positional arguments
gauge_id VARCHAR
NWPS gauge identifier (NWS LID), for example RMDV2. See https://water.noaa.gov for location discovery.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
gauge_id VARCHAR
Requested gauge identifier.
stage DOUBLE
Gauge stage associated with the impact.
stage_unit VARCHAR
Gauge stage units.
statement VARCHAR
Original flood impact statement.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Read local flood consequences by river stage

SELECT stage, stage_unit, statement
FROM nws.main.flood_impacts('RMDV2')
ORDER BY stage;
Link
flood_thresholds (gauge_id VARCHAR, max_pages := DOUBLE) 1 example

Read NWPS action, minor, moderate, and major flood thresholds with separate stage and flow units. Threshold flow units may differ from stageflow units.

Positional arguments
gauge_id VARCHAR
NWPS gauge identifier (NWS LID), for example RMDV2. See https://water.noaa.gov for location discovery.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
gauge_id VARCHAR
Requested gauge identifier.
category VARCHAR
Flood category name.
stage DOUBLE
Stage threshold relative to the gauge datum.
stage_unit VARCHAR
Stage threshold units.
flow DOUBLE
Flow threshold.
flow_unit VARCHAR
Flow threshold units; compare only after unit conversion if necessary.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Inspect gauge-specific flood stage thresholds

SELECT category, stage, stage_unit
FROM nws.main.flood_thresholds('RMDV2')
ORDER BY stage;
Link
forecast (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE) 1 example

Read the NWS day/night period forecast for a point, including the full narrative for each period.

Positional arguments
latitude DOUBLE
Latitude in decimal degrees, −90 to 90. NWS coverage is limited to its US service areas.
longitude DOUBLE
Longitude in decimal degrees, −180 to 180; west is negative.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
period_number DOUBLE
NWS period number.
name VARCHAR
Human-readable period name.
start_time TIMESTAMP WITH TIME ZONE
UTC period start.
end_time TIMESTAMP WITH TIME ZONE
UTC period end.
is_daytime BOOLEAN
Whether NWS labels this a daytime period.
temperature_c DOUBLE
Forecast temperature in Celsius.
precipitation_probability_pct DOUBLE
Probability of precipitation in percent; NULL means unavailable.
wind_speed VARCHAR
Original speed or range with units, for example 5 to 10 mph.
wind_direction VARCHAR
Compass wind direction.
short_forecast VARCHAR
Short narrative forecast.
detailed_forecast VARCHAR
Full narrative forecast.
updated_at TIMESTAMP WITH TIME ZONE
UTC last forecast update.
generated_at TIMESTAMP WITH TIME ZONE
UTC forecast generation time.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
forecast_hourly (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE) 1 example

Read the NWS hourly forecast for a point with typed period times, Celsius temperatures, precipitation probability, and wind text.

Positional arguments
latitude DOUBLE
Latitude in decimal degrees, −90 to 90. NWS coverage is limited to its US service areas.
longitude DOUBLE
Longitude in decimal degrees, −180 to 180; west is negative.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
period_number DOUBLE
NWS period number.
name VARCHAR
Human-readable period name.
start_time TIMESTAMP WITH TIME ZONE
UTC period start.
end_time TIMESTAMP WITH TIME ZONE
UTC period end.
is_daytime BOOLEAN
Whether NWS labels this a daytime period.
temperature_c DOUBLE
Forecast temperature in Celsius.
precipitation_probability_pct DOUBLE
Probability of precipitation in percent; NULL means unavailable.
wind_speed VARCHAR
Original speed or range with units, for example 5 to 10 mph.
wind_direction VARCHAR
Compass wind direction.
short_forecast VARCHAR
Short narrative forecast.
detailed_forecast VARCHAR
Full narrative forecast.
updated_at TIMESTAMP WITH TIME ZONE
UTC last forecast update.
generated_at TIMESTAMP WITH TIME ZONE
UTC forecast generation time.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Inspect hourly garden temperatures

SELECT start_time, temperature_c, short_forecast
FROM nws.main.forecast_hourly(38.0293, -78.4767)
ORDER BY start_time;
Link
gauge (gauge_id VARCHAR, max_pages := DOUBLE) 1 example

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.

Positional arguments
gauge_id VARCHAR
NWPS gauge identifier (NWS LID), for example RMDV2. See https://water.noaa.gov for location discovery.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
gauge_id VARCHAR
NWS location identifier.
name VARCHAR
Gauge and river name.
usgs_id VARCHAR
USGS site identifier when available.
reach_id VARCHAR
National Water Model reach ID when available.
latitude DOUBLE
Gauge latitude in decimal degrees.
longitude DOUBLE
Gauge longitude in decimal degrees.
state VARCHAR
State abbreviation.
county VARCHAR
County name.
office_id VARCHAR
Responsible forecast office.
rfc VARCHAR
River Forecast Center abbreviation.
time_zone VARCHAR
Upstream timezone label.
status_json VARCHAR
Observed and forecast status, retaining units and timestamps.
datums_json VARCHAR
Gauge datum definitions; stage is not absolute elevation.
attribution_json VARCHAR
Source agency attribution and links.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Inspect the James River gauge at Richmond-Westham

SELECT name, state, status_json FROM nws.main.gauge('RMDV2');
Link
gauges (bbox := VARCHAR, max_pages := DOUBLE, state := VARCHAR) 1 example

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.

Named arguments
bbox := VARCHAR
WGS84 bounds west,south,east,north; west greater than east crosses the antimeridian. Required when state is empty. · default ""
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
state := VARCHAR
Optional uppercase US state or territory abbreviation, such as VA. Filtering occurs after the bounded geographic request. · default ""
Returns columns
gauge_id VARCHAR
NWS location identifier, accepted by gauge and stageflow.
name VARCHAR
Gauge and river name.
latitude DOUBLE
WGS84 gauge latitude in decimal degrees.
longitude DOUBLE
WGS84 gauge longitude in decimal degrees.
state VARCHAR
Upstream state or territory abbreviation.
office_id VARCHAR
Responsible weather forecast office.
rfc VARCHAR
River Forecast Center abbreviation.
observed_category VARCHAR
Native observed flood/status category; not_current is not a no-flood classification.
forecast_category VARCHAR
Native forecast flood/status category.
observed_at TIMESTAMP WITH TIME ZONE
UTC observed-status time; the upstream year-one sentinel becomes NULL.
forecast_at TIMESTAMP WITH TIME ZONE
UTC forecast-status valid time; the upstream year-one sentinel becomes NULL.
status_json VARCHAR
Original observed/forecast status, retaining values, units, and upstream missing-data sentinels.
distance_km DOUBLE
Great-circle distance for gauges_near, otherwise NULL. This is not distance along a river.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
gauges_near (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, radius_km := DOUBLE, state := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
radius_km := DOUBLE
Search radius in kilometres, greater than zero and at most 500. · default 50
state := VARCHAR
Optional uppercase US state or territory abbreviation, such as VA. Filtering occurs after the bounded geographic request. · default ""
Returns columns
gauge_id VARCHAR
NWS location identifier, accepted by gauge and stageflow.
name VARCHAR
Gauge and river name.
latitude DOUBLE
WGS84 gauge latitude in decimal degrees.
longitude DOUBLE
WGS84 gauge longitude in decimal degrees.
state VARCHAR
Upstream state or territory abbreviation.
office_id VARCHAR
Responsible weather forecast office.
rfc VARCHAR
River Forecast Center abbreviation.
observed_category VARCHAR
Native observed flood/status category; not_current is not a no-flood classification.
forecast_category VARCHAR
Native forecast flood/status category.
observed_at TIMESTAMP WITH TIME ZONE
UTC observed-status time; the upstream year-one sentinel becomes NULL.
forecast_at TIMESTAMP WITH TIME ZONE
UTC forecast-status valid time; the upstream year-one sentinel becomes NULL.
status_json VARCHAR
Original observed/forecast status, retaining values, units, and upstream missing-data sentinels.
distance_km DOUBLE
Great-circle distance for gauges_near, otherwise NULL. This is not distance along a river.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
glossary (max_pages := DOUBLE) 1 example

Search NWS meteorological glossary terms and their published definitions.

Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
term VARCHAR
Glossary term.
definition VARCHAR
Original definition; may contain HTML markup.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Look up official frost terminology

SELECT term, definition FROM nws.main.glossary() WHERE term ILIKE '%frost%';
Link
grid_series (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, variable := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
Latitude in decimal degrees, −90 to 90. NWS coverage is limited to its US service areas.
longitude DOUBLE
Longitude in decimal degrees, −180 to 180; west is negative.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
variable := VARCHAR
Exact grid variable name; empty reads every variable. Example: minTemperature. Availability is determined by the upstream grid. · default ""
Returns columns
variable VARCHAR
Exact NWS grid variable name.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the validity interval.
valid_to TIMESTAMP WITH TIME ZONE
UTC exclusive end of the validity interval.
value DOUBLE
Numeric forecast value; NULL for missing or structured values.
unit VARCHAR
Native WMO unit code; do not combine unlike units.
value_json VARCHAR
Original value serialized as JSON, including structured weather and hazards.
updated_at TIMESTAMP WITH TIME ZONE
UTC grid update time.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
historic_crests (gauge_id VARCHAR, max_pages := DOUBLE) 1 example

Read published historic river crests with units and old-datum flags. This curated list is not a continuous historical observation archive.

Positional arguments
gauge_id VARCHAR
NWPS gauge identifier (NWS LID), for example RMDV2. See https://water.noaa.gov for location discovery.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
gauge_id VARCHAR
Requested gauge identifier.
occurred_at TIMESTAMP WITH TIME ZONE
UTC crest time supplied by NWPS.
stage DOUBLE
Crest stage in the declared stage units.
stage_unit VARCHAR
Crest stage units.
flow DOUBLE
Crest flow in the declared flow units.
flow_unit VARCHAR
Crest flow units.
preliminary VARCHAR
Original upstream status code; not interpreted as a boolean.
old_datum BOOLEAN
Whether NWPS flags a historical datum; such stages may not be directly comparable.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
historic_low_water (gauge_id VARCHAR, max_pages := DOUBLE) 1 example

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.

Positional arguments
gauge_id VARCHAR
NWPS NWS LID or USGS site identifier, for example RMDV2 or 02037500. NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
gauge_id VARCHAR
Requested gauge identifier.
occurred_at TIMESTAMP WITH TIME ZONE
UTC occurrence supplied by NWPS; missing sentinel dates become NULL.
stage DOUBLE
Historical low-water stage in the declared units; negative stages can be valid.
stage_unit VARCHAR
Native stage units.
flow DOUBLE
Historical low-water discharge.
flow_unit VARCHAR
Native discharge units.
statement VARCHAR
Original event description.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
latest_observation (station_id VARCHAR, max_pages := DOUBLE) 1 example

Read the most recent NWS station observation; missing measurements remain NULL and observation time is separate from retrieval time.

Positional arguments
station_id VARCHAR
station id supplied per input row; NULL produces no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
station VARCHAR
Station URL.
observed_at TIMESTAMP WITH TIME ZONE
UTC observation timestamp; data may be delayed and quality-controlled.
description VARCHAR
Text description of observed weather.
temperature_c DOUBLE
Air temperature in Celsius. NULL means unavailable, never zero.
dewpoint_c DOUBLE
Dewpoint in Celsius. NULL means unavailable, never zero.
relative_humidity_pct DOUBLE
Relative humidity in percent. NULL means unavailable, never zero.
wind_direction_deg DOUBLE
Wind direction in degrees. NULL means unavailable, never zero.
wind_speed_m_s DOUBLE
Wind speed in metres per second. NULL means unavailable, never zero.
wind_gust_m_s DOUBLE
Wind gust in metres per second. NULL means unavailable, never zero.
pressure_pa DOUBLE
Barometric pressure in pascals. NULL means unavailable, never zero.
visibility_m DOUBLE
Visibility in metres. NULL means unavailable, never zero.
precipitation_1h_mm DOUBLE
Precipitation over the last hour in millimetres. NULL means unavailable, never zero.
raw_message VARCHAR
Original observation message when provided.
measurements_json VARCHAR
Original quantitative values with unit codes and qualityControl flags.
cloud_layers_json VARCHAR
Original cloud layers with height units.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Inspect the latest temperature and wind observation

SELECT observed_at, temperature_c, wind_speed_m_s
FROM nws.main.latest_observation('KCHO');
Link
latest_product (product_type VARCHAR, office_id VARCHAR, max_pages := DOUBLE) 1 example

Retrieve the latest complete NWS text bulletin for a product type and office, such as an Area Forecast Discussion or Hazardous Weather Outlook.

Positional arguments
product_type VARCHAR
Uppercase product type, for example AFD (Area Forecast Discussion), HWO, or RWR.
office_id VARCHAR
Three-letter office/location identifier, for example LWX or AKQ; discover valid combinations with product_locations.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
id VARCHAR
Unique text product identifier.
product_code VARCHAR
Product code such as AFD or HWO.
product_name VARCHAR
Human-readable product type.
issuing_office VARCHAR
Issuing station or office.
issued_at TIMESTAMP WITH TIME ZONE
UTC issuance time.
wmo_collective_id VARCHAR
WMO collective identifier.
product_text VARCHAR
Verbatim bulletin text; NULL in index results. Use product(id) to retrieve it.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Read the latest forecast discussion, including forecaster reasoning

SELECT issued_at, product_text FROM nws.main.latest_product('AFD', 'LWX');
Link
long_range_flood_outlook (bbox := VARCHAR, gauge_id := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, state := VARCHAR, threshold_pct := DOUBLE) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
gauge_id := VARCHAR
Optional exact gauge LID, matched case-insensitively. · default ""
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
state := VARCHAR
Optional uppercase US state/territory filter. · default ""
threshold_pct := DOUBLE
Published map-classification threshold: 5,10,25,50,75,90,95 percent. · default 50
Returns columns
gauge_id VARCHAR
NWS gauge LID.
name VARCHAR
Gauge name.
state VARCHAR
State code.
office_id VARCHAR
Native WFO identifier.
rfc_id VARCHAR
Native RFC identifier.
latitude DOUBLE
Published gauge latitude.
longitude DOUBLE
Published gauge longitude.
target_period VARCHAR
Native three-month target label.
threshold_pct DOUBLE
Selected map-classification probability threshold.
map_category VARCHAR
Native classification at the selected threshold.
flood_category VARCHAR
minor, moderate or major.
probability_text VARCHAR
Native probability fraction text, including censoring operators.
probability_min_pct DOUBLE
Lower bound converted to percent; NULL if text cannot be parsed.
probability_max_pct DOUBLE
Upper bound converted to percent; NULL if text cannot be parsed.
min_inclusive BOOLEAN
Whether the lower bound is included.
max_inclusive BOOLEAN
Whether the upper bound is included.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
low_water_impacts (gauge_id VARCHAR, max_pages := DOUBLE) 1 example

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.

Positional arguments
gauge_id VARCHAR
NWPS NWS LID or USGS site identifier, for example RMDV2 or 02037500. NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
gauge_id VARCHAR
Requested gauge identifier.
value_text VARCHAR
Verbatim associated value, without inferred units or conversion.
statement VARCHAR
Original low-water impact statement.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
low_water_threshold (gauge_id VARCHAR, max_pages := DOUBLE) 1 example

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.

Positional arguments
gauge_id VARCHAR
NWPS NWS LID or USGS site identifier, for example RMDV2 or 02037500. NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
gauge_id VARCHAR
Requested gauge identifier.
threshold DOUBLE
Published low-water threshold.
unit VARCHAR
Native threshold units; do not assume stage or flow.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
map_features (product_id VARCHAR, layer_id DOUBLE, bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Positional arguments
product_id VARCHAR
NWS product ID returned by map_products, for example vector:outlooks/spc_mesoscale_discussion/MapServer. NULL emits no rows.
layer_id DOUBLE
Current numeric layer ID returned by map_layers. IDs may change after service updates; NULL emits no rows.
Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
include_geometry := BOOLEAN
Include native features transformed to WGS84 GeoJSON. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
product_id VARCHAR
Selected NWS product.
layer_id DOUBLE
Current source layer ID.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
map_features_at (product_id VARCHAR, layer_id DOUBLE, latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Positional arguments
product_id VARCHAR
NWS product ID returned by map_products, for example vector:outlooks/spc_mesoscale_discussion/MapServer. NULL emits no rows.
layer_id DOUBLE
Current numeric layer ID returned by map_layers. IDs may change after service updates; NULL emits no rows.
latitude DOUBLE
WGS84 latitude from -90 to 90; NULL emits no rows.
longitude DOUBLE
WGS84 longitude from -180 to 180; NULL emits no rows.
Named arguments
include_geometry := BOOLEAN
Include native features transformed to WGS84 GeoJSON. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
product_id VARCHAR
Selected NWS product.
layer_id DOUBLE
Current source layer ID.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
map_fields (product_id VARCHAR, layer_id := DOUBLE, max_pages := DOUBLE) 1 example

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.

Positional arguments
product_id VARCHAR
NWS product ID returned by map_products, for example vector:outlooks/spc_mesoscale_discussion/MapServer. NULL emits no rows.
Named arguments
layer_id := DOUBLE
Numeric Feature Layer ID from map_layers; ignored for ImageServer, whose catalog fields are returned. · default 0
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
product_id VARCHAR
Selected NWS product.
layer_id DOUBLE
Selected layer ID; NULL for ImageServer.
field_name VARCHAR
Native attribute name.
alias VARCHAR
Source field label.
field_type VARCHAR
ArcGIS field type.
nullable BOOLEAN
Whether the source explicitly allows NULL; NULL if unspecified.
domain_json VARCHAR
Native coded values or ranges, if provided.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
map_image_at (product_id VARCHAR, latitude DOUBLE, longitude DOUBLE, end_time := VARCHAR, max_pages := DOUBLE, page_size := DOUBLE, start_time := VARCHAR, subset := VARCHAR) 1 example

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.

Positional arguments
product_id VARCHAR
ImageServer identifier returned by map_products; NULL emits no rows.
latitude DOUBLE
WGS84 latitude, -90 to 90; NULL emits no rows.
longitude DOUBLE
WGS84 longitude, -180 to 180; NULL emits no rows.
Named arguments
end_time := VARCHAR
Optional RFC3339 UTC/timezone exclusive end; must follow start_time. · default ""
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Raster catalog records per page, 1–20; reduced to the service's mosaic limit. All pages are read unless max_pages is reached. · default 20
start_time := VARCHAR
Optional RFC3339 UTC/timezone start. Return native validity intervals intersecting the requested half-open window. · default ""
subset := VARCHAR
Optional exact idp_subset label from the source catalog. Empty includes all geographic/product subsets covering the point. · default ""
Returns columns
product_id VARCHAR
Selected ImageServer product ID.
latitude DOUBLE
Requested WGS84 latitude.
longitude DOUBLE
Requested WGS84 longitude.
raster_id DOUBLE
Source raster object ID; not stable across publications.
raster_name VARCHAR
Native raster name, if supplied.
subset VARCHAR
Native regional/product subset.
band_index DOUBLE
One-based band index; preserve this for multiband display imagery.
raw_value DOUBLE
Native nearest-neighbor band value; NULL for NoData. May be a display color rather than a physical measurement.
pixel_text VARCHAR
Original complete pixel string, including all bands.
valid_from TIMESTAMP WITH TIME ZONE
UTC native raster valid start; no period is invented.
valid_to TIMESTAMP WITH TIME ZONE
UTC native raster valid end; may equal the start for instantaneous products.
issued_at TIMESTAMP WITH TIME ZONE
UTC native reference/issue time, if supplied.
forecast_hour DOUBLE
Native forecast lead hour, if supplied.
source_file_at TIMESTAMP WITH TIME ZONE
UTC native source file timestamp.
ingested_at TIMESTAMP WITH TIME ZONE
UTC native ingestion timestamp.
attributes_json VARCHAR
Original raster catalog attributes.
sample_json VARCHAR
Original pixel sample and metadata.
metadata_url VARCHAR
Canonical raster catalog query URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
map_layers (product_id VARCHAR, max_pages := DOUBLE) 1 example

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.

Positional arguments
product_id VARCHAR
NWS product ID returned by map_products, for example vector:outlooks/spc_mesoscale_discussion/MapServer. NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
product_id VARCHAR
Selected NWS product.
layer_id DOUBLE
Current layer ID; NULL for ImageServer.
layer_name VARCHAR
Native layer name.
layer_type VARCHAR
Native ArcGIS layer kind.
parent_layer_id DOUBLE
Parent group ID; -1 denotes the service root.
geometry_type VARCHAR
Native geometry kind where published.
reader VARCHAR
Suggested worker reader; NULL for organizational/display-only layers.
description VARCHAR
Original service description, which may contain HTML.
time_info_json VARCHAR
Native service temporal metadata.
layer_json VARCHAR
Original layer descriptor.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
map_products (folder := VARCHAR, include_alternates := BOOLEAN, max_pages := DOUBLE, server := VARCHAR) 1 example

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.

Named arguments
folder := VARCHAR
Optional folder name such as outlooks or air_quality. Empty discovers all public folders. · default ""
include_alternates := BOOLEAN
Include FeatureServer views also exposed by a MapServer with the same name. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
server := VARCHAR
NWS GIS server: all, vector, raster, tropical, or eventdriven. · default "all"
Returns columns
product_id VARCHAR
Stable input identifier for map_layers and the map data readers.
server VARCHAR
NWS GIS server name.
folder VARCHAR
Source product family folder.
service_name VARCHAR
Native service path.
service_type VARCHAR
MapServer, ImageServer or FeatureServer.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Discover available NWS outlook services

SELECT product_id, service_type
FROM nws.main.map_products(server := 'vector', folder := 'outlooks')
ORDER BY product_id;
Link
map_raster_at (product_id VARCHAR, layer_id DOUBLE, latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE) 1 example

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.

Positional arguments
product_id VARCHAR
NWS product ID returned by map_products, for example vector:outlooks/spc_mesoscale_discussion/MapServer. NULL emits no rows.
layer_id DOUBLE
Current numeric layer ID returned by map_layers. IDs may change after service updates; NULL emits no rows.
latitude DOUBLE
WGS84 latitude from -90 to 90; NULL emits no rows.
longitude DOUBLE
WGS84 longitude from -180 to 180; NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
product_id VARCHAR
Selected NWS product.
layer_id DOUBLE
Selected mosaic group ID.
raw_value DOUBLE
Native unrendered pixel value; NULL for NoData.
unit VARCHAR
NULL: generic raster sampling does not infer measurement units.
latitude DOUBLE
Requested WGS84 latitude.
longitude DOUBLE
Requested WGS84 longitude.
layer_name VARCHAR
Exact upstream mosaic layer name, including any source whitespace.
raster_id DOUBLE
Source raster object ID, not stable across publications.
raster_name VARCHAR
Native raster dataset name.
valid_at TIMESTAMP WITH TIME ZONE
UTC raster valid time when the source provides it; NULL otherwise.
issued_at TIMESTAMP WITH TIME ZONE
UTC source issuance time, not an invented observation interval boundary.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp.
ingested_at TIMESTAMP WITH TIME ZONE
UTC GIS ingestion timestamp.
attributes_json VARCHAR
Original identify attributes, preserving raw pixels and display class codes.
footprint_json VARCHAR
Original raster footprint metadata and publication fields.
metadata_url VARCHAR
Canonical footprint metadata query URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
mesoscale_discussions (bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
discussion_number VARCHAR
Native SPC discussion number.
discussion_info VARCHAR
Source discussion information/path, unchanged.
discussion_html VARCHAR
Native popup HTML containing the discussion link; do not render as trusted HTML.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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();
Link
mesoscale_discussions_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
discussion_number VARCHAR
Native SPC discussion number.
discussion_info VARCHAR
Source discussion information/path, unchanged.
discussion_html VARCHAR
Native popup HTML containing the discussion link; do not render as trusted HTML.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
mrms_at (product_id VARCHAR, latitude DOUBLE, longitude DOUBLE, file_time := VARCHAR, level := DOUBLE, max_pages := DOUBLE) 1 example

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.

Positional arguments
product_id VARCHAR
Product directory returned by mrms_products, for example 2D/PrecipRate. NULL emits no rows.
latitude DOUBLE
WGS84 latitude; NULL emits no rows.
longitude DOUBLE
WGS84 longitude; NULL emits no rows.
Named arguments
file_time := VARCHAR
Exact RFC3339 filename time returned by mrms_products. Empty selects the newest retained file. · default ""
level := DOUBLE
Native filename level, or -1 to select the lowest available level at the chosen file time. · default -1
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
product_id VARCHAR
Selected source directory.
product_name VARCHAR
Native GRIB file product name.
filename VARCHAR
Exact source filename.
file_level DOUBLE
Native filename level.
file_time TIMESTAMP WITH TIME ZONE
Filename timestamp.
latitude DOUBLE
Requested WGS84 latitude.
longitude DOUBLE
Requested WGS84 longitude.
grid_latitude DOUBLE
Latitude of the sampled native grid cell.
grid_longitude DOUBLE
Longitude of the sampled grid cell, normalized to -180..180.
raw_value DOUBLE
Decoded value before interpreting product-specific missing codes.
value DOUBLE
Decoded value in native units, or NULL for recognized nonzero special codes/bitmap missing.
value_status VARCHAR
valid, bitmap_missing, missing, no_coverage, folded, ambiguous_zero_code, or unclassified_parameter; combined codes use a pipe.
unit VARCHAR
Native published parameter-table units, NULL if unclassified.
description VARCHAR
Source parameter meaning.
parameter_notes VARCHAR
Published notes and regional qualifications.
reference_at TIMESTAMP WITH TIME ZONE
GRIB identification reference time in UTC.
valid_at TIMESTAMP WITH TIME ZONE
GRIB reference plus ecCodes endStep, or the explicit statistical interval end, retaining seconds.
discipline DOUBLE
GRIB discipline code.
category DOUBLE
GRIB parameter category code.
parameter DOUBLE
GRIB parameter number.
grid_width DOUBLE
Native grid columns.
grid_height DOUBLE
Native grid rows.
packing_template DOUBLE
Native GRIB data representation template number, for example 0 simple or 41 PNG.
bitmap_missing BOOLEAN
Whether an explicit GRIB bitmap marks this point missing.
level_type DOUBLE
GRIB first fixed surface type code.
level_value DOUBLE
Scaled first fixed surface value in units defined by its type code.
missing_code DOUBLE
Published missing value code, if known.
no_coverage_code DOUBLE
Published no-coverage code, if known.
range_folded_code DOUBLE
Published range-folded code, if known.
parameter_table_url VARCHAR
NOAA NSSL parameter table used to interpret the GRIB code.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
mrms_products (folder := VARCHAR, max_pages := DOUBLE) 1 example

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.

Named arguments
folder := VARCHAR
Directory returned by discovery, or a top-level MRMS grid directory. Example: 2D/ALASKA or 2D/PrecipRate. · default "2D"
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
product_id VARCHAR
Directory path for further discovery or mrms_at.
kind VARCHAR
directory or grib2.
product_name VARCHAR
Native directory/product name.
filename VARCHAR
Published compressed GRIB2 filename for a file row.
level DOUBLE
Native level encoded in the filename; interpretation depends on product.
file_time TIMESTAMP WITH TIME ZONE
UTC timestamp encoded in the filename, separate from decoded reference/validity times.
unit VARCHAR
Published parameter-table units when known.
description VARCHAR
Published parameter description.
notes VARCHAR
Source parameter notes, including regional availability.
data_url VARCHAR
Canonical official directory or data URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Discover quantitative MRMS radar and precipitation products

SELECT product_id, unit, description
FROM nws.main.mrms_products()
WHERE kind = 'directory'
ORDER BY product_id;
Link
observations (station_id VARCHAR, end_time := VARCHAR, max_pages := DOUBLE, page_size := DOUBLE, start_time := VARCHAR) 1 example

Stream recent station observations (typically seven days), normalizing common quantities to SI units while retaining quality flags and original measurements.

Positional arguments
station_id VARCHAR
station id supplied per input row; NULL produces no rows.
Named arguments
end_time := VARCHAR
RFC3339 end with timezone. · default ""
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Requested observations per page, from 1 to 500. · default 500
start_time := VARCHAR
Inclusive RFC3339 start with timezone, within the service's recent observation window. · default ""
Returns columns
station VARCHAR
Station URL.
observed_at TIMESTAMP WITH TIME ZONE
UTC observation timestamp; data may be delayed and quality-controlled.
description VARCHAR
Text description of observed weather.
temperature_c DOUBLE
Air temperature in Celsius. NULL means unavailable, never zero.
dewpoint_c DOUBLE
Dewpoint in Celsius. NULL means unavailable, never zero.
relative_humidity_pct DOUBLE
Relative humidity in percent. NULL means unavailable, never zero.
wind_direction_deg DOUBLE
Wind direction in degrees. NULL means unavailable, never zero.
wind_speed_m_s DOUBLE
Wind speed in metres per second. NULL means unavailable, never zero.
wind_gust_m_s DOUBLE
Wind gust in metres per second. NULL means unavailable, never zero.
pressure_pa DOUBLE
Barometric pressure in pascals. NULL means unavailable, never zero.
visibility_m DOUBLE
Visibility in metres. NULL means unavailable, never zero.
precipitation_1h_mm DOUBLE
Precipitation over the last hour in millimetres. NULL means unavailable, never zero.
raw_message VARCHAR
Original observation message when provided.
measurements_json VARCHAR
Original quantitative values with unit codes and qualityControl flags.
cloud_layers_json VARCHAR
Original cloud layers with height units.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Summarize recent temperatures from a station

SELECT min(temperature_c) AS minimum_c, max(temperature_c) AS maximum_c
FROM nws.main.observations('KCHO');
Link
office (office_id VARCHAR, max_pages := DOUBLE) 1 example

Retrieve NWS forecast office contact information and responsible county and forecast zone links.

Positional arguments
office_id VARCHAR
office id supplied per input row; NULL produces no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
office_id VARCHAR
Office identifier.
name VARCHAR
Office name.
phone VARCHAR
Public telephone number.
email VARCHAR
Public contact email.
website VARCHAR
Office website.
address_json VARCHAR
Postal address object.
forecast_zones_json VARCHAR
Responsible forecast zone links.
counties_json VARCHAR
Responsible county links.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Find the local forecast office website

SELECT name, website FROM nws.main.office('LWX');
Link
parse_valid_time (valid_time VARCHAR) 2 examples

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.

Arguments
valid_time VARCHAR
NWS interval such as 2026-01-02T12:00:00Z/PT2H. NULL produces no rows.
Returns columns
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the interval.
valid_to TIMESTAMP WITH TIME ZONE
UTC exclusive end of the interval.
duration_hours DOUBLE
Duration in hours.
Examples (2)

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;
Link
point (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE) 2 examples

Resolve a US latitude and longitude to NWS grids, offices, zones, timezone, radar, and forecast links.

Positional arguments
latitude DOUBLE
Latitude in decimal degrees, −90 to 90. NWS coverage is limited to its US service areas.
longitude DOUBLE
Longitude in decimal degrees, −180 to 180; west is negative.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
office_id VARCHAR
Responsible NWS forecast office identifier.
grid_id VARCHAR
Forecast grid office.
grid_x DOUBLE
Grid X coordinate.
grid_y DOUBLE
Grid Y coordinate.
city VARCHAR
Nearest relative-location city; not a geocoded address.
state VARCHAR
Nearest city state.
time_zone VARCHAR
IANA local timezone reported by NWS.
forecast_zone VARCHAR
Forecast zone identifier.
county VARCHAR
County zone identifier.
fire_weather_zone VARCHAR
Fire weather zone identifier.
radar_station VARCHAR
Associated radar site identifier.
forecast_url VARCHAR
Period forecast URL.
hourly_url VARCHAR
Hourly forecast URL.
grid_url VARCHAR
Raw gridded forecast URL.
stations_url VARCHAR
Nearby observation stations URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Examples (2)

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;
Link
precipitation_anomaly_at (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, metric := VARCHAR, period := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude, -90 to 90; NULL emits no rows.
longitude DOUBLE
WGS84 longitude, -180 to 180, west negative; NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
metric := VARCHAR
Comparison metric: all, normal, departure, or percent_of_normal. All returns distinct rows with their own units and timestamps. · default "all"
period := VARCHAR
Published daily accumulation window: today; day7, day10, day14, day30, day60, day90, day120, day180, day365; month_to_date, year_to_date, or water_year_to_date. Hourly normals are unavailable. · default "day30"
Returns columns
period VARCHAR
Selected daily accumulation window.
metric VARCHAR
normal, departure, or percent_of_normal.
value DOUBLE
Published raw comparison value; negative departures and zero are retained, NoData is NULL.
unit VARCHAR
inches for normal/departure, percent for percent_of_normal.
latitude DOUBLE
Requested WGS84 latitude.
longitude DOUBLE
Requested WGS84 longitude.
layer_name VARCHAR
Exact upstream mosaic layer name, including any source whitespace.
raster_id DOUBLE
Source raster object ID, not stable across publications.
raster_name VARCHAR
Native raster dataset name.
valid_at TIMESTAMP WITH TIME ZONE
UTC raster valid time when the source provides it; NULL otherwise.
issued_at TIMESTAMP WITH TIME ZONE
UTC source issuance time, not an invented observation interval boundary.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp.
ingested_at TIMESTAMP WITH TIME ZONE
UTC GIS ingestion timestamp.
attributes_json VARCHAR
Original identify attributes, preserving raw pixels and display class codes.
footprint_json VARCHAR
Original raster footprint metadata and publication fields.
metadata_url VARCHAR
Canonical footprint metadata query URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
precipitation_forecast (bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
period := VARCHAR
WPC accumulation period selector, for example day1 or day1_7; supported periods are published in argument choices. · default "day1"
Returns columns
period VARCHAR
Requested accumulation period selector.
product VARCHAR
Native WPC product name.
contour_value DOUBLE
Native precipitation contour value, not an interpolated point amount.
unit VARCHAR
Native precipitation units, normally Inches; not automatically converted.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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');
Link
precipitation_forecast_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
period := VARCHAR
WPC accumulation period selector, for example day1 or day1_7; supported periods are published in argument choices. · default "day1"
Returns columns
period VARCHAR
Requested accumulation period selector.
product VARCHAR
Native WPC product name.
contour_value DOUBLE
Native precipitation contour value, not an interpolated point amount.
unit VARCHAR
Native precipitation units, normally Inches; not automatically converted.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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');
Link
precipitation_observed_at (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, period := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude, -90 to 90; NULL produces no rows.
longitude DOUBLE
WGS84 longitude, -180 to 180, west negative; NULL produces no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
period := VARCHAR
Latest RFC accumulation window. hour24 is rolling 24 hours; today is Today's Analysis. Additional rolling and calendar choices are listed in the constraint. · default "hour24"
Returns columns
latitude DOUBLE
Requested WGS84 latitude.
longitude DOUBLE
Requested WGS84 longitude.
period VARCHAR
Requested accumulation selector.
precipitation DOUBLE
Raw estimated precipitation; NULL for NoData. Never a rendered class index.
unit VARCHAR
Native rainfall estimate units: inches.
layer_name VARCHAR
Published accumulation layer name.
raster_id DOUBLE
Current raster object ID, not stable across publications.
raster_name VARCHAR
Source raster dataset name.
issued_at TIMESTAMP WITH TIME ZONE
Source issuance timestamp; not an invented validity boundary.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file time.
ingested_at TIMESTAMP WITH TIME ZONE
UTC GIS ingestion time.
attributes_json VARCHAR
Original identify attributes, including raw pixel and class values.
footprint_json VARCHAR
Source raster metadata with original publication fields.
metadata_url VARCHAR
Canonical footprint metadata request URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
product (product_id VARCHAR, max_pages := DOUBLE) 1 example

Retrieve a text product by its unique identifier, retaining the original bulletin text and issuance metadata.

Positional arguments
product_id VARCHAR
product id supplied per input row; NULL produces no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
id VARCHAR
Unique text product identifier.
product_code VARCHAR
Product code such as AFD or HWO.
product_name VARCHAR
Human-readable product type.
issuing_office VARCHAR
Issuing station or office.
issued_at TIMESTAMP WITH TIME ZONE
UTC issuance time.
wmo_collective_id VARCHAR
WMO collective identifier.
product_text VARCHAR
Verbatim bulletin text; NULL in index results. Use product(id) to retrieve it.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
product_locations (product_type VARCHAR, max_pages := DOUBLE) 1 example

Discover issuing locations supporting a given text product type; use these identifiers with products and latest_product.

Positional arguments
product_type VARCHAR
product type supplied per input row; NULL produces no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
office_id VARCHAR
Issuing location identifier.
name VARCHAR
Location description; may be NULL upstream.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Find offices issuing Area Forecast Discussions

SELECT office_id, name
FROM nws.main.product_locations('AFD')
ORDER BY office_id;
Link
product_types (max_pages := DOUBLE) 1 example

List NWS text product codes and names for discovering discussions, outlooks, summaries, and other bulletins.

Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
code VARCHAR
Three-character product code.
name VARCHAR
Product description.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Discover fire-weather bulletin types

SELECT code, name
FROM nws.main.product_types()
WHERE name ILIKE '%fire%'
ORDER BY code;
Link
products (product_type VARCHAR, office_id VARCHAR, max_pages := DOUBLE) 1 example

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).

Positional arguments
product_type VARCHAR
Uppercase product type, for example AFD (Area Forecast Discussion), HWO, or RWR.
office_id VARCHAR
Three-letter office/location identifier, for example LWX or AKQ; discover valid combinations with product_locations.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
id VARCHAR
Unique text product identifier.
product_code VARCHAR
Product code such as AFD or HWO.
product_name VARCHAR
Human-readable product type.
issuing_office VARCHAR
Issuing station or office.
issued_at TIMESTAMP WITH TIME ZONE
UTC issuance time.
wmo_collective_id VARCHAR
WMO collective identifier.
product_text VARCHAR
Verbatim bulletin text; NULL in index results. Use product(id) to retrieve it.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

List recent Area Forecast Discussions for Sterling, Virginia

SELECT id, issued_at
FROM nws.main.products('AFD', 'LWX')
ORDER BY issued_at DESC;
Link
rainfall_outlook (bbox := VARCHAR, day := DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
day := DOUBLE
Forecast day counted from the latest product cycle; availability depends on the selected product. · default 1
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
day DOUBLE
Forecast day.
category VARCHAR
Published risk label or the documented name of its native category code.
category_code DOUBLE
Native GIS category code. This is not necessarily a probability or common severity scale.
risk_description VARCHAR
Original risk explanation when supplied by WPC.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
rainfall_outlook_at (latitude DOUBLE, longitude DOUBLE, day := DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
day := DOUBLE
Forecast day counted from the latest product cycle; availability depends on the selected product. · default 1
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
day DOUBLE
Forecast day.
category VARCHAR
Published risk label or the documented name of its native category code.
category_code DOUBLE
Native GIS category code. This is not necessarily a probability or common severity scale.
risk_description VARCHAR
Original risk explanation when supplied by WPC.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
rating_curve (gauge_id VARCHAR, max_pages := DOUBLE, only_tenths := BOOLEAN, row_limit := DOUBLE, sort := VARCHAR) 1 example

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.

Positional arguments
gauge_id VARCHAR
NWPS NWS LID or USGS site identifier, for example RMDV2 or 02037500. NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
only_tenths := BOOLEAN
Ask NWPS to retain only tenths-of-a-foot increments; this is source filtering, not local rounding. · default false
row_limit := DOUBLE
Maximum rating points requested, 1–10000. A full-limit response may omit points; inspect possibly_truncated. · default 10000
sort := VARCHAR
Sort by stage, ASC or DESC. · default "ASC"
Returns columns
gauge_id VARCHAR
Requested gauge identifier.
stage DOUBLE
Stage in the gauge datum.
stage_unit VARCHAR
Native stage units.
flow DOUBLE
Rated discharge at this stage.
flow_unit VARCHAR
Native discharge units, not necessarily the same as stageflow.
possibly_truncated BOOLEAN
True when response length reaches the requested limit; completeness cannot then be guaranteed.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
reach (reach_id VARCHAR, max_pages := DOUBLE) 1 example

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.

Positional arguments
reach_id VARCHAR
Numeric National Water Model reach identifier as text; discover it with gauge. NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
reach_id VARCHAR
National Water Model reach identifier.
name VARCHAR
Reach name.
latitude DOUBLE
Representative reach latitude in decimal degrees.
longitude DOUBLE
Representative reach longitude in decimal degrees.
available_series_json VARCHAR
NWPS series identifiers available for this reach.
upstream_json VARCHAR
Immediate upstream segments, retaining reachId and streamOrder.
downstream_json VARCHAR
Immediate downstream segments, retaining reachId and streamOrder.
metadata_json VARCHAR
Complete native reach metadata.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Discover model streamflow products and connected segments for Deep Creek

SELECT reach_id, name, available_series_json, upstream_json
FROM nws.main.reach('23021904');
Link
reach_streamflow (reach_id VARCHAR, max_pages := DOUBLE, series := VARCHAR) 1 example

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.

Positional arguments
reach_id VARCHAR
Numeric National Water Model reach identifier as text; discover it with gauge. NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
series := VARCHAR
National Water Model product identifier; short_range by default. Choose analysis_assimilation for modeled analysis or a medium/long range product for forecasts. · default "short_range"
Returns columns
reach_id VARCHAR
Requested National Water Model reach identifier.
series VARCHAR
Selected model product.
member VARCHAR
Native series key, such as series, mean, or member1. Not all products have ensemble members.
reference_at TIMESTAMP WITH TIME ZONE
UTC model reference/cycle time.
valid_at TIMESTAMP WITH TIME ZONE
UTC forecast or analysis valid time.
flow DOUBLE
Model streamflow value; missing values remain NULL.
flow_unit VARCHAR
Verbatim model discharge units; no conversion to gauge units.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
river_at_a_glance (gauge_ids VARCHAR, max_pages := DOUBLE) 1 example

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.

Positional arguments
gauge_ids VARCHAR
Comma-separated NWS gauge LIDs, case-insensitive, with duplicates removed. NULL emits no rows. The reader enforces the documented batch-size limit.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
gauge_id VARCHAR
Native gauge LID.
name VARCHAR
Gauge name.
office_id VARCHAR
Responsible WFO.
rfc_id VARCHAR
River forecast center.
flood_statements_json VARCHAR
Complete native flood statement array, retaining units and dates.
record_json VARCHAR
Original gauge summary record.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
river_flood_outlook (bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
outlook VARCHAR
Native significant-flooding status.
product VARCHAR
Source outlook product description.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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();
Link
river_flood_outlook_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
outlook VARCHAR
Native significant-flooding status.
product VARCHAR
Source outlook product description.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
river_network (gauge_id VARCHAR, direction := VARCHAR, max_pages := DOUBLE) 1 example

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.

Positional arguments
gauge_id VARCHAR
Starting NWPS gauge identifier, for example RMDV2.
Named arguments
direction := VARCHAR
Network direction filter: both, upstream, or downstream. · default "both"
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
origin_gauge_id VARCHAR
Resolved starting gauge ID from NWPS.
gauge_id VARCHAR
Connected gauge ID, accepted by gauge and stageflow.
name VARCHAR
Connected gauge name.
direction VARCHAR
upstream or downstream relative to the origin.
sequence_number DOUBLE
One-based array position within this direction; not river distance.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
severe_outlook (bbox := VARCHAR, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
day := DOUBLE
Forecast day counted from the latest product cycle; availability depends on the selected product. · default 1
hazard := VARCHAR
SPC product selector; categorical, tornado, hail, wind, or severe. Day 3 and later probabilities use severe; tornado, hail, and wind are supported on days 1 and 2. · default "categorical"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
day DOUBLE
Forecast day.
hazard VARCHAR
Selected convective product.
category VARCHAR
Published risk label or the documented name of its native category code.
category_code DOUBLE
Native GIS category code. This is not necessarily a probability or common severity scale.
probability_pct DOUBLE
Native SPC probability contour in percent; NULL for categorical outlooks.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
severe_outlook_at (latitude DOUBLE, longitude DOUBLE, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
day := DOUBLE
Forecast day counted from the latest product cycle; availability depends on the selected product. · default 1
hazard := VARCHAR
SPC product selector; categorical, tornado, hail, wind, or severe. Day 3 and later probabilities use severe; tornado, hail, and wind are supported on days 1 and 2. · default "categorical"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
day DOUBLE
Forecast day.
hazard VARCHAR
Selected convective product.
category VARCHAR
Published risk label or the documented name of its native category code.
category_code DOUBLE
Native GIS category code. This is not necessarily a probability or common severity scale.
probability_pct DOUBLE
Native SPC probability contour in percent; NULL for categorical outlooks.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
snow_analysis_at (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, variable := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude, -90 to 90; NULL emits no rows.
longitude DOUBLE
WGS84 longitude, -180 to 180, west negative; NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
variable := VARCHAR
Snow quantity: both, depth, or water_equivalent. Both emits separate rows and preserves each variable's valid time. · default "both"
Returns columns
variable VARCHAR
depth or water_equivalent; never sum these distinct quantities.
raw_value DOUBLE
Native GRIB pixel value; zero and missing data are distinct.
raw_unit VARCHAR
m for snow depth, kg m-2 for water equivalent.
value_mm DOUBLE
Snow depth in millimetres or liquid-water-equivalent millimetres, as identified by variable.
latitude DOUBLE
Requested WGS84 latitude.
longitude DOUBLE
Requested WGS84 longitude.
layer_name VARCHAR
Exact upstream mosaic layer name, including any source whitespace.
raster_id DOUBLE
Source raster object ID, not stable across publications.
raster_name VARCHAR
Native raster dataset name.
valid_at TIMESTAMP WITH TIME ZONE
UTC raster valid time when the source provides it; NULL otherwise.
issued_at TIMESTAMP WITH TIME ZONE
UTC source issuance time, not an invented observation interval boundary.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp.
ingested_at TIMESTAMP WITH TIME ZONE
UTC GIS ingestion timestamp.
attributes_json VARCHAR
Original identify attributes, preserving raw pixels and display class codes.
footprint_json VARCHAR
Original raster footprint metadata and publication fields.
metadata_url VARCHAR
Canonical footprint metadata query URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
soil_moisture_at (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE, region := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude, -90 to 90; NULL emits no rows.
longitude DOUBLE
WGS84 longitude, -180 to 180, west negative; NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
region := VARCHAR
Published model region: auto, conus, alaska, hawaii, or puerto_rico. Auto queries all regions and returns only rasters with footprints at the point. · default "auto"
Returns columns
region VARCHAR
Resolved model region, never auto in output.
saturation_pct DOUBLE
Modeled saturation in percent, converted from the native 0–1 fraction.
raw_value DOUBLE
Native soil saturation fraction; not a map color/class code.
raw_unit VARCHAR
fraction; multiply by 100 for percent saturation.
soil_depth_cm DOUBLE
Depth represented by the near-surface product: top 40 cm.
latitude DOUBLE
Requested WGS84 latitude.
longitude DOUBLE
Requested WGS84 longitude.
layer_name VARCHAR
Exact upstream mosaic layer name, including any source whitespace.
raster_id DOUBLE
Source raster object ID, not stable across publications.
raster_name VARCHAR
Native raster dataset name.
valid_at TIMESTAMP WITH TIME ZONE
UTC raster valid time when the source provides it; NULL otherwise.
issued_at TIMESTAMP WITH TIME ZONE
UTC source issuance time, not an invented observation interval boundary.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp.
ingested_at TIMESTAMP WITH TIME ZONE
UTC GIS ingestion timestamp.
attributes_json VARCHAR
Original identify attributes, preserving raw pixels and display class codes.
footprint_json VARCHAR
Original raster footprint metadata and publication fields.
metadata_url VARCHAR
Canonical footprint metadata query URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
space_weather_products (folder := VARCHAR, max_pages := DOUBLE, recursive := BOOLEAN) 1 example

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.

Named arguments
folder := VARCHAR
Directory path from discovery, or the special value all to discover top-level folders. Example: json/goes/primary. · default "all"
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
recursive := BOOLEAN
Recursively scan child directories. max_pages bounds directory requests and fails rather than silently truncating. · default false
Returns columns
product_id VARCHAR
Trusted relative SWPC file or directory path.
kind VARCHAR
json, text, or directory.
data_url VARCHAR
Canonical official source URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Discover current GOES space-weather feeds

SELECT product_id, kind
FROM nws.main.space_weather_products(folder := 'json/goes/primary')
ORDER BY product_id;
Link
space_weather_rows (product_id VARCHAR, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Positional arguments
product_id VARCHAR
Exact JSON/text product path returned by space_weather_products; NULL emits no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Records per batch, 1–1000. Text products emit one original-text row. · default 500
Returns columns
product_id VARCHAR
Selected relative SWPC product path.
record_index DOUBLE
Zero-based source row; not a stable record ID.
record_key VARCHAR
Native key for keyed products such as NOAA scale horizons.
observed_at TIMESTAMP WITH TIME ZONE
Explicit native time_tag/observation time when present; NULL otherwise.
forecast_at TIMESTAMP WITH TIME ZONE
Explicit native forecast time when present; NULL otherwise.
record_json VARCHAR
Full native record, preserving string values, native missing markers and nested quantities.
context_json VARCHAR
Original table header or grid metadata needed to interpret each record.
text VARCHAR
Original complete text bulletin, or NULL for JSON data.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
stageflow (gauge_id VARCHAR, max_pages := DOUBLE, product := VARCHAR) 2 examples

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.

Positional arguments
gauge_id VARCHAR
NWPS gauge identifier (NWS LID), for example RMDV2. See https://water.noaa.gov for location discovery.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
product := VARCHAR
both, observed, or forecast. Forecast values are predictions, not measurements. · default "both"
Returns columns
gauge_id VARCHAR
Requested NWS gauge identifier.
product VARCHAR
observed or forecast; never combine them as measurements.
valid_at TIMESTAMP WITH TIME ZONE
UTC time the value applies to.
generated_at TIMESTAMP WITH TIME ZONE
UTC sample generation time when available.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issuance time.
primary_value DOUBLE
Primary measurement or prediction; NULL remains unavailable.
primary_name VARCHAR
Primary quantity name, often Stage.
primary_unit VARCHAR
Native primary units, often ft.
secondary_value DOUBLE
Secondary measurement or prediction.
secondary_name VARCHAR
Secondary quantity name, often Flow.
secondary_unit VARCHAR
Native secondary units, such as kcfs; not automatically converted.
office_id VARCHAR
Office reported by the stageflow product.
pedts VARCHAR
SHEF physical element, duration, type, source, extremum code.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Examples (2)

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;
Result
gauge_id peak_stage unit category_reached next_category headroom
RMDV2 6.3 ft NULL action 2.7
Link
station (station_id VARCHAR, max_pages := DOUBLE) 1 example

Look up an NWS observation station's name, location, elevation, and zone links.

Positional arguments
station_id VARCHAR
station id supplied per input row; NULL produces no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
station_id VARCHAR
Station identifier used by observation functions.
name VARCHAR
Station name.
latitude DOUBLE
Latitude in decimal degrees.
longitude DOUBLE
Longitude in decimal degrees.
elevation_m DOUBLE
Station elevation in metres.
time_zone VARCHAR
Station timezone.
forecast_zone VARCHAR
Forecast zone URL.
county VARCHAR
County zone URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Inspect Charlottesville airport observation station

SELECT station_id, name, elevation_m FROM nws.main.station('KCHO');
Link
stations_at (latitude DOUBLE, longitude DOUBLE, max_pages := DOUBLE) 2 examples

List observation stations associated with a point's forecast grid; these are not guaranteed to be ordered by distance or availability.

Positional arguments
latitude DOUBLE
Latitude in decimal degrees, −90 to 90. NWS coverage is limited to its US service areas.
longitude DOUBLE
Longitude in decimal degrees, −180 to 180; west is negative.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
station_id VARCHAR
Station identifier used by observation functions.
name VARCHAR
Station name.
latitude DOUBLE
Latitude in decimal degrees.
longitude DOUBLE
Longitude in decimal degrees.
elevation_m DOUBLE
Station elevation in metres.
time_zone VARCHAR
Station timezone.
forecast_zone VARCHAR
Forecast zone URL.
county VARCHAR
County zone URL.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Examples (2)

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;
Link
storm_reports (bbox := VARCHAR, event := VARCHAR, include_geometry := BOOLEAN, lookback_hours := DOUBLE, max_pages := DOUBLE, page_size := DOUBLE, state := VARCHAR) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
event := VARCHAR
Optional exact event description, matched case-insensitively, for example Hail. Empty includes all event types. · default ""
include_geometry := BOOLEAN
Include the report's WGS84 GeoJSON point geometry; typed latitude and longitude are always returned. · default false
lookback_hours := DOUBLE
Published rolling window in hours: 24, 48, or 72. This is not an arbitrary historical date range. · default 24
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
state := VARCHAR
Optional uppercase US state or territory code. Empty includes all; applied after geographic retrieval. · default ""
Returns columns
lookback_hours DOUBLE
Selected published rolling report window: 24, 48, or 72 hours.
reported_at TIMESTAMP WITH TIME ZONE
UTC time associated with the report by the LSR service; distinct from ingestion.
event VARCHAR
Native event description, such as Hail, Rain, or Tornado.
location VARCHAR
Verbatim location description.
state VARCHAR
Reported state or territory code.
office_id VARCHAR
Issuing weather forecast office ID.
office_name VARCHAR
Issuing office name.
magnitude DOUBLE
Numeric magnitude only when the entire native text is numeric; otherwise NULL.
magnitude_text VARCHAR
Verbatim magnitude, retaining estimates, qualifications, and missing-value text.
unit VARCHAR
Native magnitude units; depend on event type and are not converted.
remarks VARCHAR
Original forecaster remarks and reported impacts.
latitude DOUBLE
Report point latitude transformed by ArcGIS to WGS84.
longitude DOUBLE
Report point longitude transformed by ArcGIS to WGS84.
distance_km DOUBLE
Great-circle distance for storm_reports_near; NULL for a layer scan.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
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) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude, -90 to 90; NULL emits no rows.
longitude DOUBLE
WGS84 longitude, -180 to 180; NULL emits no rows.
Named arguments
event := VARCHAR
Optional exact event description, matched case-insensitively, for example Hail. Empty includes all event types. · default ""
include_geometry := BOOLEAN
Include the report's WGS84 GeoJSON point geometry; typed latitude and longitude are always returned. · default false
lookback_hours := DOUBLE
Published rolling window in hours: 24, 48, or 72. This is not an arbitrary historical date range. · default 24
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
radius_km := DOUBLE
Great-circle search radius in kilometres, greater than zero and at most 500. · default 50
state := VARCHAR
Optional uppercase US state or territory code. Empty includes all; applied after geographic retrieval. · default ""
Returns columns
lookback_hours DOUBLE
Selected published rolling report window: 24, 48, or 72 hours.
reported_at TIMESTAMP WITH TIME ZONE
UTC time associated with the report by the LSR service; distinct from ingestion.
event VARCHAR
Native event description, such as Hail, Rain, or Tornado.
location VARCHAR
Verbatim location description.
state VARCHAR
Reported state or territory code.
office_id VARCHAR
Issuing weather forecast office ID.
office_name VARCHAR
Issuing office name.
magnitude DOUBLE
Numeric magnitude only when the entire native text is numeric; otherwise NULL.
magnitude_text VARCHAR
Verbatim magnitude, retaining estimates, qualifications, and missing-value text.
unit VARCHAR
Native magnitude units; depend on event type and are not converted.
remarks VARCHAR
Original forecaster remarks and reported impacts.
latitude DOUBLE
Report point latitude transformed by ArcGIS to WGS84.
longitude DOUBLE
Report point longitude transformed by ArcGIS to WGS84.
distance_km DOUBLE
Great-circle distance for storm_reports_near; NULL for a layer scan.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
tropical_features (bbox := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, product := VARCHAR) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
include_geometry := BOOLEAN
Include source geometry transformed to WGS84 GeoJSON. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
product := VARCHAR
NHC product selector: outlook_2day, outlook_7day, development_motion, development_region, forecast_points, forecast_track, forecast_cone, watches_warnings, past_points, past_track, past_wind_swath, past_wind_radii, forecast_wind_radii, advisory_wind_field, wind_arrival_earliest, wind_arrival_likely, wind_probability_34kt, wind_probability_50kt, wind_probability_64kt, peak_surge_points, peak_surge_lines, peak_surge_areas, breakpoints, surge_communication_points. · default "forecast_points"
Returns columns
product VARCHAR
Selected NHC product family.
product_id VARCHAR
Source map service, usable with map_layers/map_fields.
layer_id DOUBLE
Current source layer ID.
storm_name VARCHAR
Native storm name, if present.
source_wallet VARCHAR
Reusable NHC/CPHC source slot derived from idp_source, if supplied.
advisory_number VARCHAR
Native advisory identifier; may contain intermediate-advisory suffixes.
advisory_time_text VARCHAR
Unchanged advisory time wording, if supplied.
valid_time_text VARCHAR
Unchanged native validity text; no timezone or forecast lead is inferred.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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;
Link
tropical_features_at (latitude DOUBLE, longitude DOUBLE, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, product := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
latitude supplied per input row; NULL produces no rows.
longitude DOUBLE
longitude supplied per input row; NULL produces no rows.
Named arguments
include_geometry := BOOLEAN
Include source geometry transformed to WGS84 GeoJSON. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
product := VARCHAR
NHC product selector: outlook_2day, outlook_7day, development_motion, development_region, forecast_points, forecast_track, forecast_cone, watches_warnings, past_points, past_track, past_wind_swath, past_wind_radii, forecast_wind_radii, advisory_wind_field, wind_arrival_earliest, wind_arrival_likely, wind_probability_34kt, wind_probability_50kt, wind_probability_64kt, peak_surge_points, peak_surge_lines, peak_surge_areas, breakpoints, surge_communication_points. · default "forecast_cone"
Returns columns
product VARCHAR
Selected NHC product family.
product_id VARCHAR
Source map service, usable with map_layers/map_fields.
layer_id DOUBLE
Current source layer ID.
storm_name VARCHAR
Native storm name, if present.
source_wallet VARCHAR
Reusable NHC/CPHC source slot derived from idp_source, if supplied.
advisory_number VARCHAR
Native advisory identifier; may contain intermediate-advisory suffixes.
advisory_time_text VARCHAR
Unchanged advisory time wording, if supplied.
valid_time_text VARCHAR
Unchanged native validity text; no timezone or forecast lead is inferred.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
weather_hazards (bbox := VARCHAR, hazard_group := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
hazard_group := VARCHAR
Native layer group: temperature, precipitation, or wildfire_drought. · default "temperature"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
period := VARCHAR
Hazard outlook period: 3_7_day or 8_14_day. · default "3_7_day"
Returns columns
period VARCHAR
Selected outlook window.
hazard_group VARCHAR
Selected source layer group.
hazard VARCHAR
Verbatim hazard label, including any probability wording.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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();
Link
weather_hazards_at (latitude DOUBLE, longitude DOUBLE, hazard_group := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
hazard_group := VARCHAR
Native layer group: temperature, precipitation, or wildfire_drought. · default "temperature"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
period := VARCHAR
Hazard outlook period: 3_7_day or 8_14_day. · default "3_7_day"
Returns columns
period VARCHAR
Selected outlook window.
hazard_group VARCHAR
Selected source layer group.
hazard VARCHAR
Verbatim hazard label, including any probability wording.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
weather_stories (office_id VARCHAR, max_pages := DOUBLE) 1 example

Read an office's weather story metadata and image download links without downloading binary assets.

Positional arguments
office_id VARCHAR
office id supplied per input row; NULL produces no rows.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
office_id VARCHAR
Issuing office.
title VARCHAR
Briefing or story title.
description VARCHAR
Published description.
start_time TIMESTAMP WITH TIME ZONE
UTC start of applicability.
end_time TIMESTAMP WITH TIME ZONE
UTC end of applicability.
updated_at TIMESTAMP WITH TIME ZONE
UTC update time.
download_url VARCHAR
Published document or image link; content is not downloaded.
alt_text VARCHAR
Image alternative text when supplied.
priority DOUBLE
Upstream display priority.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Find current local weather story graphics

SELECT title, download_url FROM nws.main.weather_stories('LWX');
Link
winter_precipitation (bbox := VARCHAR, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, threshold_inches := DOUBLE) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
day := DOUBLE
Forecast day 1, 2, or 3 from the current WPC cycle. · default 1
hazard := VARCHAR
Accumulation type: snow or ice. · default "snow"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
threshold_inches := DOUBLE
Snow: 4, 8, or 12 inches. Ice: exactly 0.25 inches; set this explicitly with hazard ice. · default 4
Returns columns
day DOUBLE
Forecast day.
hazard VARCHAR
snow or ice.
threshold_inches DOUBLE
Selected accumulation threshold in inches.
product VARCHAR
Verbatim WPC product description, including its threshold wording.
category VARCHAR
Native risk label and probability band.
category_code DOUBLE
Native category ID; not a probability.
probability_min_pct DOUBLE
Published lower bound of the probability band, inclusive.
probability_max_pct DOUBLE
Published upper bound of the probability band, inclusive.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
winter_precipitation_at (latitude DOUBLE, longitude DOUBLE, day := DOUBLE, hazard := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, threshold_inches := DOUBLE) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
day := DOUBLE
Forecast day 1, 2, or 3 from the current WPC cycle. · default 1
hazard := VARCHAR
Accumulation type: snow or ice. · default "snow"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
threshold_inches := DOUBLE
Snow: 4, 8, or 12 inches. Ice: exactly 0.25 inches; set this explicitly with hazard ice. · default 4
Returns columns
day DOUBLE
Forecast day.
hazard VARCHAR
snow or ice.
threshold_inches DOUBLE
Selected accumulation threshold in inches.
product VARCHAR
Verbatim WPC product description, including its threshold wording.
category VARCHAR
Native risk label and probability band.
category_code DOUBLE
Native category ID; not a probability.
probability_min_pct DOUBLE
Published lower bound of the probability band, inclusive.
probability_max_pct DOUBLE
Published upper bound of the probability band, inclusive.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
winter_storm_probability (bbox := VARCHAR, component := VARCHAR, forecast_hour := DOUBLE, impact := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
component := VARCHAR
Impact component: overall, snow_amount, snow_load, ice, or blowing_snow. · default "overall"
forecast_hour := DOUBLE
Window end lead: 24,30,...,168 hours; 0 returns every available lead. · default 24
impact := VARCHAR
Impact threshold: winter_weather, minor, moderate, major, or extreme. · default "moderate"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
forecast_hour DOUBLE
Native forecast lead at the end of the rolling window.
component VARCHAR
Native impact component.
impact VARCHAR
Native impact threshold.
probability_pct DOUBLE
Published probability contour in percent.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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();
Link
winter_storm_probability_at (latitude DOUBLE, longitude DOUBLE, component := VARCHAR, forecast_hour := DOUBLE, impact := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
component := VARCHAR
Impact component: overall, snow_amount, snow_load, ice, or blowing_snow. · default "overall"
forecast_hour := DOUBLE
Window end lead: 24,30,...,168 hours; 0 returns every available lead. · default 24
impact := VARCHAR
Impact threshold: winter_weather, minor, moderate, major, or extreme. · default "moderate"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
Returns columns
forecast_hour DOUBLE
Native forecast lead at the end of the rolling window.
component VARCHAR
Native impact component.
impact VARCHAR
Native impact threshold.
probability_pct DOUBLE
Published probability contour in percent.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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);
Link
winter_storm_severity (bbox := VARCHAR, component := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR) 1 example

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.

Named arguments
bbox := VARCHAR
Optional WGS84 bounding box west,south,east,north; west greater than east crosses the antimeridian. Empty scans the selected layer. · default ""
component := VARCHAR
WSSI component: overall, snow_amount, snow_load, ice, or blowing_snow. · default "overall"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
period := VARCHAR
WSSI period: day1, day2, day3, or day1_3 (the full forecast window). · default "day1_3"
Returns columns
period VARCHAR
Selected WSSI forecast window.
component VARCHAR
Requested WSSI component.
source_component VARCHAR
Native component identifier.
impact VARCHAR
Verbatim impact category, including WINTER WEATHER AREA and MINOR through EXTREME.
product VARCHAR
Original WPC product name.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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');
Link
winter_storm_severity_at (latitude DOUBLE, longitude DOUBLE, component := VARCHAR, include_geometry := BOOLEAN, max_pages := DOUBLE, page_size := DOUBLE, period := VARCHAR) 1 example

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.

Positional arguments
latitude DOUBLE
WGS84 latitude in decimal degrees, from -90 to 90.
longitude DOUBLE
WGS84 longitude in decimal degrees, from -180 to 180; west is negative.
Named arguments
component := VARCHAR
WSSI component: overall, snow_amount, snow_load, ice, or blowing_snow. · default "overall"
include_geometry := BOOLEAN
Return full WGS84 GeoJSON polygons. Large geometries may exceed the HTTP response size bound. · default false
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
page_size := DOUBLE
Features requested per upstream page, from 1 to 500; the service limit may be lower. · default 100
period := VARCHAR
WSSI period: day1, day2, day3, or day1_3 (the full forecast window). · default "day1_3"
Returns columns
period VARCHAR
Selected WSSI forecast window.
component VARCHAR
Requested WSSI component.
source_component VARCHAR
Native component identifier.
impact VARCHAR
Verbatim impact category, including WINTER WEATHER AREA and MINOR through EXTREME.
product VARCHAR
Original WPC product name.
issued_at TIMESTAMP WITH TIME ZONE
UTC product issue time when provided; file time is reported separately.
valid_from TIMESTAMP WITH TIME ZONE
UTC start of the forecast period.
valid_to TIMESTAMP WITH TIME ZONE
UTC end of the forecast period.
object_id DOUBLE
Upstream feature ID, unique only within the layer and current publication.
layer_name VARCHAR
Exact upstream layer name resolved from service metadata.
source_file_at TIMESTAMP WITH TIME ZONE
UTC source file timestamp, distinct from product issuance.
ingested_at TIMESTAMP WITH TIME ZONE
UTC time the GIS service ingested the feature.
geometry_json VARCHAR
Unclipped WGS84 GeoJSON geometry when include_geometry is true; otherwise NULL.
attributes_json VARCHAR
Original feature attributes, preserving upstream category codes and date strings.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

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');
Link
zone (zone_type VARCHAR, zone_id VARCHAR, max_pages := DOUBLE) 1 example

Retrieve an NWS zone boundary as GeoJSON. Use affected_zones_json from alerts to resolve alerts whose own geometry is NULL.

Positional arguments
zone_type VARCHAR
NWS zone type: forecast, county, fire, land, marine, public, coastal, or offshore.
zone_id VARCHAR
Zone identifier such as VAZ037 or VAC540.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
Returns columns
zone_id VARCHAR
NWS zone identifier.
name VARCHAR
Zone name.
type VARCHAR
Zone type.
state VARCHAR
State abbreviation.
geometry_json VARCHAR
GeoJSON zone geometry; index responses may omit it.
offices_json VARCHAR
JSON array of responsible office IDs.
time_zones_json VARCHAR
JSON timezone array.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Retrieve the forecast zone boundary for Albemarle County

SELECT name, geometry_json FROM nws.main.zone('forecast', 'VAZ037');
Link
zones (zone_type VARCHAR, max_pages := DOUBLE, state := VARCHAR) 1 example

List NWS zone metadata, optionally filtered by state. Index geometry may be absent; use zone(type, id) for a boundary.

Positional arguments
zone_type VARCHAR
NWS zone type: forecast, county, fire, land, marine, public, coastal, or offshore.
Named arguments
max_pages := DOUBLE
Maximum upstream pages per input (1–1000); exceeding it raises an error instead of returning a partial result. · default 100
state := VARCHAR
Optional uppercase two-letter state filter such as VA. · default ""
Returns columns
zone_id VARCHAR
NWS zone identifier.
name VARCHAR
Zone name.
type VARCHAR
Zone type.
state VARCHAR
State abbreviation.
geometry_json VARCHAR
GeoJSON zone geometry; index responses may omit it.
offices_json VARCHAR
JSON array of responsible office IDs.
time_zones_json VARCHAR
JSON timezone array.
source_url VARCHAR
Canonical upstream API URL for this row.
fetched_at TIMESTAMP WITH TIME ZONE
UTC time this API representation was fetched or revalidated; cache hits retain this time.
Example

Discover Virginia fire-weather zones

SELECT zone_id, name
FROM nws.main.zones('fire', state := 'VA')
ORDER BY zone_id;
Link

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

Uses stations_atlatest_observation

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

Uses pointofficezone

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.