radar

by Ray Patrick
(other software)

View National Weather Service Doppler radar from your command line!

Radar imagery from Charleston, SC

Download:

I host radar at my Git server. To download radar, simply run:

git clone git://git.raypatrick.xyz/radar.git
cd radar
sudo make install


If you'd prefer to view radar in your browser, check out my ultralight Web-based version here.

Name

radar - NWS Doppler radar on the command line

Synopsis

radar [sitecode|city] [-l, --list] [-s, --search regex] [-u, --url sitecode|city] [-h, --help]

Description

radar is a tool for retrieving National Weather Service (NWS) Doppler radar imagery from the command line. It links to the "lite" version of the NWS RIDGE site and retrieves the animated .GIF file showing about the last 30 minutes of precipitation at the site you select. You can specify an ICAO code directly (such as KNQA for Memphis International Airport) or you can type a city name. If there's a WSR-88 site in that city, radar will find it and retrieve its imagery. Cities with spaces in their names should be encapsulated in quotes, for example "Los Angeles".

Options

[sitecode|city]
sitecode can be any ICAO code, such as KOKX for New York City. Site codes are case-insensitive. Alternatively you can specify a city and radar will do its best to locate its imagery. Running radar "New York" gives identical results to radar KNQA.
[-l, --list]
Will print a list of every NEXRAD Doppler radar in the United States, showing city, state, and ICAO code, to standard output. This information is stored in /usr/local/radar/share/radars.txt.
[-s, --search regex]
This is really a shortcut for grep -w regex radars.txt. Examples: $ radar -s "TX:" will list all the sites in Texas; $ radar -s "AFB" will list all the sites at US Air Force Bases.
[-u, --url sitecode|city]
Just prints the generated URL to standard output instead of opening it with mpv(1).
[-h, --help]
Prints an abbreviated set of usage instructions to standard output.

A Neat Trick

Requires dmenu. If you run radar -l or radar --list, radar will print a list of all NEXRAD doppler radar sites that it can query. You can parse this list with dmenu to get a fuzzy-search capability:

radar $(radar --list | dmenu)

When the dmenu bar comes up, start typing your city or your state's postal abbreviation and see what comes up!

Files

/usr/local/radar/share/radars.txt
Contains information on all NEXRAD sites in the United States. Each line has the form City, ST: KABC, where ST is the two-letter abbreviation for a US State and KABC is the ICAO code.

Bugs

radar is a POSIX shell script. On your system, /bin/sh must be a POSIX-compliant shell (or a link to one) for radar to work.

License

GPLv3

Author

Written by Ray Patrick in 2020.
https://raypatrick.xyz
ray@raypatrick.xyz

See Also

mpv(1)