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

Charles R Harris charlesr.harris@gmail....
Sun Nov 13 18:17:15 CST 2011

On Sun, Nov 13, 2011 at 4:39 PM, Charles R Harris <charlesr.harris@gmail.com
> wrote:

> On Sun, Nov 13, 2011 at 2:49 PM, Gökhan Sever <gokhansever@gmail.com>wrote:
>> On Sun, Nov 13, 2011 at 1:35 PM, Charles R Harris <
>> charlesr.harris@gmail.com> wrote:
>>> It's kind of a pain, no? I ended up using the java swath tool and a
>>> script. I'm not proud of it, but I've attached it in case you find parts of
>>> it is useful. I hope it was a working version of the script ;) The swath
>>> tool omits some of the useful projections.
>>> Chuck
>> Hi,
>> Could you provide a working example version of the script (with data and
>> other scripts included)? I am still not clear about this swath2grid
>> conversion action :) Can ms2gt have a Python equivalent? Isn't basemap
>> doing a similar conversion?
> I'll take a look, I think I still have both the geolocation file and the
> data file somewhere, but they are rather large so it might be easier if you
> just download the files from the NASA sight once I can recall exactly where
> that was. You need both for the level 2 products in order to disentangle
> the overlapping push broom swaths and the viewing geometry and interpolate
> the result for the projection. It's a non trivial problem that I left to
> the swath tool. Some of the other tools are supposed to be able to do that
> also, but the documentation wasn't good enough that I wanted to pursue that
> line. Also, installing the swath tool on linux leaves some needed info in
> the .bash_profile file that you might want to move to .bashrc, I don't know
> how things work on windows. I think the higher level data products are
> easier to deal with.
> I wasn't overjoyed with the state of the NASA public software ;)
The data files can be found at ftp://ladsweb.nascom.nasa.gov/allData/5, with

MYD021KM -- 1 km pixels
MYD02HKM -- half km pixels
MYD02QKM -- quarter km pixels
MYD02SSH -- 5 km subsampling of 1km pixels.

MOD021KM -- 1 km pixels
MOD02HKM -- half km pixels
MOD02QKM -- quarter km pixels
MOD02SSH -- 5 km subsampling of 1 km pixels.

The geolocation files start with M{Y,O}DO3 with the year/day/file#/005 part
the same as for the data files. For instance
is the data file and MYD03.A2006215.0330.005.2009251122219.hdf is the
geo-location file.

Too run a conversion

In [1]: import amwse

In [2]: amwse.granule_to_h5("MYD02QKM.A2006215.0330.005.2009251204640.hdf")

In [3]: amwse.make_cutouts("MYD02QKM.A2006215.0330.005.2009251204640.h5")

Note that I was only interested in the spectral bands with 250 m spatial
resolution, which were just two. The lower resolution data sets contain
more bands.

If you get something good working I'd be interested.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20111113/0fbf786e/attachment.html 

More information about the SciPy-User mailing list