Univeristy of Alabama in Huntsville


IDL Routines from Phillip Bitzer and UAH Lightning Group

summary     class     fields     routine details     file attributes



Radar, Plot

This routine will appropriate colors and levels for radar variables. The colors are derived from values for the ARMOR (Huntsville, AL). Optionall, you can get a palette consistent with the RSL library or for the IDL version, here.

The returned value is a structure with 3xN values for colors and N levels. On error, -1 is returned.

Current options to the this_var input parameter are:

'dz' : reflectivity 'dr' : differential reflectivity 'rh' : rho HV - correlation coefficient 'kd' : KDP - specific differential phase 'pd' : particle ID (for hydrometeoers)
Note 'dza' will retrieve the reflectivity colors/levels.

There are several helper routines in the file that are not shown in the documentation. The main routine is pmb_radar_palette.


Assuming you have a 2d array of radar values, data, you can get an appropriate palette with:

armor = pmb_radar_palette('dz')
And then, using Coyote Graphics to plot the data:
cgCONTOUR, data, levels = armor.levels, palette = armor.colors
For a colorbar:
nlevels = N_ELEMENTS(armor.levels) cgCOLORBAR, ncolors =nlevels, range = [MIN(armor.levels), MAX(armor.levels)], $ palette = armor.colors, divisions = nlevels, ticknames=[STRING(FIX(armor.levels), FORMAT='(I3)'), ' ']

Author information


Phillip M. Bitzer, University of Alabama in Huntsville, pm.bitzer "AT" uah.edu


Modification History:

Written from legacy code: Jul ??, 2012 PMB Added error catcher and cleaned documentation 20121016 PMB Removed uneccessary parameter check;update of doc 20121105 PMB Added KDP palette 20121105 PMB Changed KDP color palette, using suggestion from Elise Schultz 20121106 PMB Updated documentation with KDP 20121109 PMB Added labels output keyword. Handy for plotting PD data. 20121212 PMB Deleted the "nothing" label/color for PD data 20121212 PMB Changed the colors for PD data 20121212 PMB Added `color24` keyword to get the 24bit color 20121228 PMB Added RSL keyword to plot using the RSL color table (DZ only, for now) 20130119 PMB Changed how grayscale palettes are generated so that all variables can return grayscale Also made under the hood change to where levels are calculated. 20130125 PMB Fixed typo when getting ~RSL table for DZ 20130126 PMB Added HighLow keyword 20130126 PMB Renamed file to pmb_radar_palette 20130325 PMB Added alias for DZK->DZ palette 20130419 PMB There is some debate which colors/levels should be used for DR. Changed to match ATS509 notes plots. 20131030 PMB


Routines from pmb_radar_palette.pro

result = pmb_radar_palette_kdp(Levels=Levels)
result = pmb_radar_palette( [this_var] [, Labels=string array] [, /BW] [, /HighLow] [, RSL= boolean] [, Color24= boolean])

Given a radar variable, return a structure with appropariate colors and levels

Routine details

top pmb_radar_palette_kdp

result = pmb_radar_palette_kdp(Levels=Levels)



top pmb_radar_palette

result = pmb_radar_palette( [this_var] [, Labels=string array] [, /BW] [, /HighLow] [, RSL= boolean] [, Color24= boolean])

Given a radar variable, return a structure with appropariate colors and levels

Return value

A structure with two tags: colors and levels


this_var in optional type=string default=dz

the 2 len string describing the variable.


Labels out optional type=string array

set this keyowrd to a named variable to return the string labels. Only used for the 'pd' variable

BW in optional type=boolean default=0

Return a grayscale color palette. Depending on the variable, a different method is used. For DZ, this is done by the "luminosity" method. Other variables are done via the "average" method.

See GIMP documentation for more information.

Note a different weighting is used than specified for the "luminosity" method.

HighLow in optional type=boolean default=0

If set, the colors returned scale from white to black. Only used if bw is also set.

RSL in optional type= boolean default=0

If set, this will return the color table that is used by the RSL library

Color24 in optional type= boolean default=0

return the 24 bit value of the colors instead of the RGB triple

Other attributes


None, External

File attributes

Modification date: Tue Mar 25 17:16:36 2014
Lines: 186
Docformat: rst rst