-
Notifications
You must be signed in to change notification settings - Fork 0
Radar Downloader
full-bars edited this page Jul 5, 2026
·
3 revisions
SPCBot includes a high-performance downloader for raw NEXRAD Level 2 radar data, leveraging the NOAA AWS S3 archive.
The /download command allows users to retrieve raw radar data for post-event analysis.
-
Site Selection: Supports all 160+ NEXRAD sites (e.g.,
KTLX,KOKX). - Time Filtering: Retrieve data by specific datetime, time range, or the "N most recent" files.
-
Z-to-Z Range: Supports shorthand for Z-time ranges (e.g.,
start: 2200, end: 0030).
- ZIP Output: For multi-file requests, the bot automatically zips the data before uploading it to Discord, respecting file size limits.
-
Concurrent Downloads: Utilizes
aioboto3for non-blocking, parallel S3 downloads, significantly reducing wait times for large datasets.
-
Backend: Pulls directly from the
unidata-nexrad-level2bucket on AWS S3. - Metadata Search: The bot performs real-time S3 prefix listing to find the exact filenames and timestamps required, ensuring accuracy even across UTC day boundaries.
- Efficiency: Downloads are streamed directly to a temporary buffer and then zipped, minimizing disk I/O.
-
Size Limits: Operators can configure the maximum number of files per request in
.envto prevent resource exhaustion. - Permissioning: Access to the downloader can be restricted to specific roles or channels via Discord's native integration settings.
Generates an animated reflectivity GIF for any location and time, without needing to know a radar site code.
- Location Input: Accepts city/state, zip code, or coordinates — geocoded via OSM Nominatim.
- Site Resolution: Finds the nearest NEXRAD site via the R-tree spatial index.
- Time Handling: Converts a local date/time and timezone to UTC automatically.
-
Data Source: Fetches IEM national composite N0Q reflectivity frames (
frames×intervalminutes, default 6 frames at 5-minute spacing, max 30 frames). - Size Management: Frames auto-scale down if the resulting GIF would exceed Discord's 25MB upload limit; temporary files are deleted after upload.