Univeristy of Alabama in Huntsville

UAH LTG IDL Library

IDL Routines from Phillip Bitzer and UAH Lightning Group

summary     class     fields     routine details     file attributes

ats509/

ats_radar_palette.pro

Radar, Plot, ATS509


This routine will return appropriate colors and levels for various radar variables.

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
There is a more robust routine available pmb_radar_palette. This routine is used for the notes in ATS509.

Examples

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

pal = ats_radar_palette('dz')
And then, using Function Graphics to plot the data:
c = CONTOUR(data, x, y, C_VALUE=pal.levels, RGB_TABLE=pal.colors, RGB_INDICES=LINDGEN(pal.levels.length)
For a colorbar:
cb = COLORBAR(TARGET=c)

Author information

Author

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

History

Modification History:

Written from legacy code: Jul ??, 2012 PMB Changed name to ats_radar_palette 20131103 PMB Updated to use `COLORTABLE`, removing Coyote dependency. 20171107 PMB Future updates will be in the Git log.

Routines

top ats_radar_palette

result = ats_radar_palette(variable)

This routine returns the colors and levels for the desired radar variable.

Return value

A structure with two tags: levels and colors.

Parameters

variable in required type=string

The variable you wish to retrieve a color palette for. It is case insensitive. Allowed options are 'dz', 'dr', and 'rh'

Other attributes

Uses:

None

File attributes

Modification date: Mon Nov 13 15:25:26 2017
Lines: 43
Docformat: rst rst