Plotting Radar Data

Here is a former class project, which is now given here as an example of plotting raster graphics. Reflectivity values in polar coordinates is given in KIWA.vol140.dat.gz, and is described in format.text. (Provided by Chris Calvert). Your browser may automatically "gunzip" anyfile.dat.gz into anyfile.dat, and allow you to save as anyfile.dat. It used to be that "shift and click" allowed one to download and save as anyfile.dat.gz, but that doesn't seem to be working for us anymore. If you save as KIWA.vol140.dat, that is fine, you can skip the manual gunzip command provided below. If you are curious about the decompression command gunzip, and the compression command gzip, then you may want to visit the gzip home page. But the basic usefullness is rather simple to understand. gzip reversibly compresses files to be smaller, and adds the .gz extension. For common text files, the compression can sometimes be to about 20% of the original size. For files of numbers stored in binary format, without reptition or patterns in the numbers, the compression may not be much at all. For a long text file with repeating lines of a single character, the reduction in file size is very substantial.


pix
A "canned" software package produced this plot .

Here is my rendition made with render.c, used as so:

gunzip KIWA.vol140.dat.gz
cc -o render render.c -lm
render K*.dat
convert radar.ppm radar.png
Radar data plotted with render.c. The colors were extracted from the color scheme on the right, which comes from this NOAA site. The color scale is slightly different from that plotted by the "canned" software package.