[TAG] Global home movies with cron and Imagemagick

Karsten M. Self karsten at linuxmafia.com
Sat Dec 31 03:44:14 MSK 2005


I was just showing this to Heather.  I've been trying to figure out
what's going on with our strange California weather (tropical rainstorms
for the past two weeks) and decided that moving satellite images were
more interesting than static ones.  Among other discoveries, we've been
getting a tropical express mainlined to us over the Pacific for the past
several weeks, and the movies make this very apparent.

There are two parts to this tip:  first, you want to start grabbing
satellite images as they're available, then you want to string them
together to view them.  Updates are 30 minutes and 3 hours for regional
and hemispheric views, respectively.


For the fetch, I use cron to schedule downloads, storing them in a
large local area, 'data/weather', with a timestamp added to the
filename.  Recipie, add to your personal crontab:

------------------------------------------------------------------------
# Fetch satellite image files
# ...West coast Infrared
*/30 * * * *	cd data/weather;  wget --quiet -O WCIR-$( date +\%Y\%m\%d-\%H\%M\%S).jpg http://www.goes.noaa.gov/GIFS/WCIR.JPG
# ...East coast Infrared
1/30 * * * *	cd data/weather;  wget --quiet -O ECIR-$( date +\%Y\%m\%d-\%H\%M\%S).jpg http://www.goes.noaa.gov/GIFS/ECIR.JPG
# ... west hemisphere IR
22 */3 * * *	cd data/weather; wget --quiet -O GWIR-$( date +\%Y\%m\%d-\%H\%M\%S).jpg http://www.goes.noaa.gov/FULLDISK/GWIR.JPG
# ... east hemisphere IR
23 */3 * * *	cd data/weather; wget --quiet -O GEIR-$( date +\%Y\%m\%d-\%H\%M\%S).jpg http://www.goes.noaa.gov/FULLDISK/GEIR.JPG
------------------------------------------------------------------------

To animate images, say, from the past five days, you can animate 'find'
results.  To look at west-coast infraread images:

    animate -pause 2 -delay 25 $( find . -mtime -5 -name WCIR\*  | sort)


There's some cleanup you may need to do as the download images
occasionally get out of order.  I've found deleting duplicates seems to
fix this pretty readily.

You can also experiment with image enhancements via ImageMagick, such as
increasing size and contrast, and reducing noise, in the downloaded
images.

Happy cloud watching.


-- 
Karsten M. Self <karsten at linuxmafia.com>        http://linuxmafia.com/~karsten
    Ceterum censeo, Caldera delenda est.





More information about the TAG mailing list