comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » reading multiple HDF files
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: reading multiple HDF files [message #61393 is a reply to message #61338] Wed, 16 July 2008 06:27 Go to previous messageGo to previous message
julia.walterspiel is currently offline  julia.walterspiel
Messages: 35
Registered: July 2008
Member
well, it works, it doesnt, then it does, then it doesnt..
???????

here's the small code, if one of you could look at it quickly? I'm
pretty sure, the error will strike you immediatley. However, it
doesn't strike ME.

PRO read_multiple_hdf

hdf_file_path=FILE_SEARCH('I:\zue\doc\ks\Temp_Satellite_Data \Temp_MODIS
\MOD_08_jointAerosolWaterVaporCloudProduct\*.hdf')



;*********************************************************** *****
;********** Begin the for loop to read all selected hdf files ***

for i=0,n_elements(hdf_file_path)-1 do begin

hdfid = HDF_SD_START(hdf_file_path(i))
varnames = HDF_SD_VARDIR (hdfid)

index = hdf_sd_nametoindex(hdfid,
'Cloud_Fraction_Mean_Mean') ;varnames[Cloud_Fraction_Mean_Mean])
if (index eq -1) then message, string(varnames, format='("Specified
Variable not found: ", a)')


varid = hdf_sd_select(hdfid, index)

HDF_SD_GETDATA, varid, data ;- The Cloud Fraction data will be
stored in the variable "data"

hdf_sd_endaccess, varid

; *********** get the filename only, without path
filename_short = file_basename(hdf_file_path[i])

; to be continued....
endfor
END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: help about annotate
Next Topic: merge data-array with calender-date-array

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 14:49:35 PDT 2025

Total time taken to generate the page: 1.11864 seconds