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/

ess_read_modis1b.pro

MODIS, File I/O, ATS509


Given a file of level 1B MODIS data (aka, swath data), this function will read the bands and return them in an array of [n, m, nBands].

This routine is designed for the 1km aggegrated data files. With a little work, it could be expanded.... You can get MODIS from here

For now, nBands=7. These bands are retrieved:

Band 1 0.62-0.67 um Band 2 0.841-0.876 um Band 3 0.459-0.479 um Band 4 0.545-0.565 um Band 5 1.230-1.250 um Band 6 1.628-1.652 um Band 7 2.105-2.155 um
A similar version is available in the PMB library, pmb_read_modis1b

Examples

There's a main level program included, but the usage is pretty basic:

file = 'MOD021KM.A2005240.1700.005.2010159164217.hdf' bands = ESS_READ_MODIS1b(file)
Bands will be am array with three dimensions. The last dimension is the band. See ess_plot_modis for plotting this data.

Author information

Author

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

History

Modification History:

First written: ??, 2013 Ready for release, 20131028 PMB

Other file information

Uses:

None

Routines

top ess_read_modis1b

result = ess_read_modis1b(file [, Latlon=structure])

This function returns data from a MODIS swath (level 1b) file.

Return value

An [n, m, nBands] array of unisgned long integers. Band 1 is stored in index zero of the last dimension, band 2 is in index one, etc. On error, a Nan is returned.

Parameters

file in required type=string

The file we are to read. Should be 1km aggregated data (for now).

Keywords

Latlon out optional type=structure

If requested, a structure containing tags for the swath latitudes and longitudes is returned.

Other attributes

Uses:

None

File attributes

Modification date: Tue Mar 25 17:14:03 2014
Lines: 45
Docformat: rst rst