Re: reading multiple HDF files [message #61563 is a reply to message #61379] |
Fri, 18 July 2008 11:43   |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
On Jul 16, 8:54 am, julia.waltersp...@gmail.com wrote:
> hdfid = HDF_SD_START(hdf_file_path(i), /READ)
> varnames = HDF_SD_VARDIR (hdfid)
> index = hdf_sd_nametoindex(hdfid,
> 'Cloud_Fraction_Mean_Mean') ;varnames[Cloud_Fraction_Mean_Mean])
> varid = hdf_sd_select(hdfid, index)
> HDF_SD_GETDATA, varid, data ;- The Cloud Fraction data will > HDF_SD_ENDACCESS, varid
> HDF_SD_END, hdfid
I would recommend sds_read.pro (http://www.ssec.wisc.edu/~gumley/
sds_read.html). Using SDS_READ, the above code could be reduced to:
IDL> sds_read,hdf_file_path[i],data,sds='Cloud_Fraction_Mean_Mean ',/
read_all
Also, I note this is a Level 2 product you are reading, so stacking
the data, while probably possible, will maybe not give you what you
want, since each scene is separately geo-referenced.
|
|
|