How to put a live, looping weather radar map on your desktop using GeekTool
I've managed to get a looping live weather radar on my Mac desktop using Geektool, and I love it. It shows a looping weather radar from the last two hours. Sadly, GeekTool cannot directly display an animated gif, but it can loop through a folder of images. [Note: Sorry non-US residents, I don't know what the non-US version of NOAA is...but if you can find an animated gif for a weather radar, this method should still work for you.] Here's what you'll need:
1) Install
ImageMagick. The easiest way to get it installed is to use MacPorts...or even perhaps Homebrew.
2) Install or confirm you have access to the curl command. The wget command should work too, but I haven't tested it.
3) Create a new shell script in GeekTool. This first geeklet won't display anything and is only in charge of periodically downloading an image file. The radar image on the server is updated about every 4 or 5 minutes, so you can set your script to refresh every 240 seconds, or whatever. Run these two lines of code:
Code:
# This first line downloads an animated gif containing 8 weather radar frames to a temporary directory.
# XXX is the type of radar image you want to see. I'd recommend either "Base Reflectivity" (N0R) or "Composite Reflectivity" (NCR)
# YYY is the code for your nearest weather radar. For example, SRX = Western Alaska, FWS = Forth Worth, Texas, etc
# Find the definition of XXX and YYY at the bottom of [URL="http://www.srh.noaa.gov/jetstream/doppler/ridge_download.htm"]THIS NOAA WEBPAGE[/URL].
# For example, if you lived in Fort Worth, Texas and you wanted to see the Base Reflectivity Radar Images
# you'd want the image at <http://radar.weather.gov/lite/N0R/FWS_loop.gif>.
curl --silent "http://radar.weather.gov/lite/XXX/YYY_loop.gif" -o /path/to/temp/weather.gif
# This next line uses ImageMagick's "convert" command to break the .gif into its component frames
# and store those 8 frames in a folder called "RADARIMAGES" in the jpg format
/path/to/convert /path/to/temp/weather.gif /path/to/temp/RADARIMAGES/radar_%03d.jpg
4) Create an Image geeklet on your desktop. The size of the weather radar image is about 600 x 550. Point the geeklet to look at the FOLDER /path/to/temp/RADARIMAGES/, not any individual image in that folder. Set the refresh rate on this geeklet at 1 second.
5) Boom. Every 4 minutes it should download a new radar image, break it into its 8 component radar images, then loop through those 8 images at the rate of about 1 image per second.
There is another way to do this, which could also display more than a 2-hour loop, but the method above seemed like the easiest way for now.