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

ats/modis/

pmb_plot_modis.pro

MODIS, Plotting

includes main-level program

Working file to get a plot of MODIS data, given three bands that represent the RGB values. The plot is actually an image. In addition, several map entities are plotted.

This code is largely based on initial work by D. Fanning, originally named swath2image.

Examples

A main level program is provided to illustrate the use. This example requires PMB_READ_MODIS1b:

file = 'MOD021KM.A2005240.1700.005.2010159164217.hdf' bands = PMB_READ_MODIS1b(file, latlon=ll) r = bands[*, *, 0] g = bands[*, *, 3] b = bands[*, *, 2] pmb_plot_modis, r, g, b, ll.lat, ll.lon

Author information

Author

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

History

Modification History:

First written: ??, 2013 Ready for initial release, 20131029 PMB

Other file information

Uses:

Hist_ND, cgReverseIndices, cgMap, cgMap_Continents, cgMapGrid, cgImage

Routines

Routines from pmb_plot_modis.pro

result = pmb_plot_modis_scale(color)

This helper routine will do scaling of an array for you and perform histogram equalization.

pmb_plot_modis, rBand, gBand, bBand, lat, lon [, Image=array] [, /NoScale] [, BinX=double] [, BinY=double] [, Projection=string or integer] [, Ellipsoid=string or integer] [, oMap=class cgMap] [, oCont=class cgMapContinents] [, oGrid=class cgMapGrid] [, /Quiet], latRange=latRange, lonRange=lonRange

Create an image from bands from MODIS.

Routine details

top pmb_plot_modis_scale

result = pmb_plot_modis_scale(color)

This helper routine will do scaling of an array for you and perform histogram equalization.

Return value

Given a n element array, an n element array of scaled values is returned.

Parameters

color in required type=numeric array

The values to be scaled.

top pmb_plot_modis

pmb_plot_modis, rBand, gBand, bBand, lat, lon [, Image=array] [, /NoScale] [, BinX=double] [, BinY=double] [, Projection=string or integer] [, Ellipsoid=string or integer] [, oMap=class cgMap] [, oCont=class cgMapContinents] [, oGrid=class cgMapGrid] [, /Quiet], latRange=latRange, lonRange=lonRange

Create an image from bands from MODIS.

Parameters

rBand in required type=numeric array

nxm element array of values to use for the red channel

gBand in required type=numeric array

nxm element array of values to use for the green channel

bBand in required type=numeric array

n element array of values to use for the blue channel

lat in required type=numeric array

nxm element array giving the latitudes (in degrees) of each element of the color channels

lon in required type=numeric array

nxm element array giving the latitudes (in degrees) of each element of the color channels

Keywords

Image out optional type=array

If set, this will return the 3d array of the image.

NoScale in optional type=boolean default=0B

If set, the data is not scaled and histogram equalization is not performed

BinX in optional type=double default=5D3

Specify the horizontal bin size of the image. Smaller values suggest higher resolution.

BinY in optional type=double default=5D3

Specify the vertical bin size of the image. Smaller values suggest higher resolution.

Projection in optional type=string or integer default=Mercator

The projection to be used for the map. Passed to cgMap cgMap

Ellipsoid in optional type=string or integer default=WGS 84

The ellipsoid to be used for the map. Passed to cgMap cgMap

oMap out optional type=class cgMap

Object of class cgMap. If any of the mapping objects are requested, then none of the mapping objects are destroyed.

oCont out optional type=class cgMapContinents

Object of class cgMapContinents. If any of the mapping objects are requested, then none of the mapping objects are destroyed.

oGrid out optional type=class cgMapGrid

Object of class cgMapGrid. If any of the mapping objects are requested, then none of the mapping objects are destroyed.

Quiet in optional type=boolean default=0B

If set, it will supress the warning about destroying objects.

latRange
lonRange

Other attributes

Uses:

Hist_ND, cgReverseIndices, cgMap, cgMap_Continents, cgMapGrid, cgImage

File attributes

Modification date: Wed May 14 18:46:41 2014
Lines: 98
Docformat: rst rst