NEXRAD radar — catalog explorer (no network)¶
Explore the bundled WSR-88D station registry offline: counts, a lookup, a bounding-box query, and a scatter of every site. No S3 access — this notebook runs deterministically at docs-build time.
Setup¶
The only imports we need: StationCatalog from earthlens.radar (the bundled WSR-88D registry) and matplotlib for the site scatter at the end.
import matplotlib.pyplot as plt
from earthlens.radar import StationCatalog
How many sites are catalogued?¶
Instantiate the offline StationCatalog and count the WSR-88D sites it ships with.
cat = StationCatalog()
print(f'catalogued WSR-88D sites: {len(cat.datasets)}')
Look up a single station¶
get_station() resolves a four-letter site id (here KTLX, the Oklahoma City radar) to its name, state, and coordinates.
ktlx = cat.get_station('KTLX')
print(ktlx.name, ktlx.state, ktlx.latitude, ktlx.longitude)
Query by bounding box¶
in_bbox() returns the site ids whose coordinates fall inside a (min_lon, min_lat, max_lon, max_lat) window — here a box over Oklahoma and north Texas.
cat.in_bbox(-100, 33, -95, 37)
Map every site¶
Pull the longitude/latitude of every catalogued station and scatter them over the continental US to see the full WSR-88D network at a glance.
lons = [s.longitude for s in cat.datasets.values()]
lats = [s.latitude for s in cat.datasets.values()]
fig, ax = plt.subplots(figsize=(9, 5))
ax.scatter(lons, lats, s=12, c='tab:blue')
ax.set(xlabel='longitude', ylabel='latitude', title=f'{len(lats)} NEXRAD WSR-88D sites')
ax.set_xlim(-170, -60)
ax.set_ylim(10, 60)
plt.show()