[SciPy-User] MODIS data and true-color plotting

Gökhan Sever gokhansever at gmail.com
Wed Nov 16 20:03:45 EST 2011


On Sun, Nov 13, 2011 at 12:40 PM, Gökhan Sever <gokhansever at gmail.com>wrote:

> Hello groups,
>
> I have two questions about working with MODIS data.
>
> 1-) Is there any light Pythonic HDF-EOS wrapper to handle HDF-EOS data
> other than PyNIO [http://www.pyngl.ucar.edu/Nio.shtml] Although, I have
> managed to install that package from its source, it took me many hours to
> figure out all the installation quirks. Something simpler to build and
> mainly for HDFEOS data??
>
> 2-) Another similar question: Has anybody attempted to create true-color
> MODIS images (like the ones shown at [
> http://rapidfire.sci.gsfc.nasa.gov/realtime/]) in Python? So far, I have
> seen one clear tutorial [
> ftp://ftp.ssec.wisc.edu/pub/IMAPP/MODIS/TrueColor/] to create natural
> color images, but uses ms2gt [http://nsidc.org/data/modis/ms2gt/], NDVI
> and IDL. Except the reflectance correction via NDVI, ms2gt and IDL parts
> seem to be implemented in Python.
>
> Till now, I have some progress combining GOES imagery with aircraft data.
> My next task is to combine MODIS data with aircraft and radar data. I would
> be happy to get some guidance and code support if there is any previous
> work been done using Python.
>
> Thanks.
>

Hello all,

Here is my answer to my 2nd question:

http://imageshack.us/photo/my-images/713/modistrue1km.png/

Python script is at
http://code.google.com/p/ccnworks/source/browse/trunk/modis/true.py

This code is based on TrueColor tutorial of Liam Gumley [
ftp://ftp.ssec.wisc.edu/pub/IMAPP/MODIS/TrueColor/] and Peter Kuma's ccplot
tool [http://ccplot.org/]

Currently it only plots true color images from Aqua or Terra using Level 1B
data. For the example image I use the data provided via TrueColor link.

Notes:

1-) Using PyNIO to open hdf-eos files, from ccplot using cctk for 2D data
interpolation, basemap for map plotting and numpy/scipy for other
essentials.

2-) crefl.1km.hdf is reflectance corrected data using NVDI's crefl program.
Set-up TrueColor tutorial and you should be able to get these correction
applied data by calling its main script or set-up another.

3-) MOD03.hdf is the geolocation data.

4-) No need to run ms2gt or any other swath to grid conversion tools, since
the interpolation routine handles this step.

5-) Code is in 100 lines. Unlike TrueColor tutorial it only works for 1KM
resolution. HKM and QKM resolution plotting requires additional steps.

It takes about 2.5 seconds to get the plot on my screen.

Let me know if you have any comments or other suggestions.

Thanks.


-- 
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20111116/229cc8ff/attachment.html>


More information about the SciPy-User mailing list