Re: reading multiple HDF files [message #61431 is a reply to message #61379] |
Thu, 17 July 2008 08:40   |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
I. I see several people have recommended Liam Gumley's HDF routines,
but not the best one of all: SDS_READ (http://www.ssec.wisc.edu/
~gumley/sds_read.html). I have found this to work with every MODIS
product I've tried and several other kinds of data, and it does
everything for you. It has a GUI for easy file exploration, but works
great in scripts too. It's called like so:
IDL> sds_read,<HDF_FILE>,<DUMMY>,/INFO ; see a list of available SDS
(GUI) and get metadata printed out;
IDL> sds_read,<HDF_FILE>,<DATA>,/READ_ALL,SDS=<SDS_NAME>; pull in an
SDS from the HDF file (no GUI);
II. Now, as for your application ending with:
homer[*,*,i]= data[*,*]
Your initial post suggested you were reading MODIS Level 2 data, which
have different geolocation for each granule. Thus, while you can
theoretically stack the data as you did there, you're missing a lot of
information you'll need to actually interpret the data. Maybe I'm
misunderstanding what you're trying to do, or maybe you're using MODIS
L3 data, where the reprojected data will actually stack properly.
III. For diagnosing memory limitation issues, you'll want MEMTEST. I
can no longer remember if this is a built-in or not, but if it's not
built-in, you'll want it in your library. It gives a concise rundown
of memory available and fragmentation.
Good luck!
--Edward H.
|
|
|