f



About "Invalid HDF file or filename" using hdf_sd_start on a valid HDF file due to loop through too many hdf files

I saw multiple posts asking about using the function "hdf_sd_start" to open HDF files in some sort of big loops and having issue after a certain number of files. 

My loop was stopped with the same error in IDL version 8.4.1
"% HDF_SD_START: Invalid HDF file or filename (../MCD43GF_C5/2015/MCD43GF_vol_Band1_233_2015.hdf)."

But this file is valid and can be opened with the exact command in a new IDL terminal. 
If this file is removed, the code will break at exact the same spot but with next file.


Anybody found the solution to this file handling problem? 

This is the pair of command I used to access HDF.

Fileid = hdf_sd_start(filename,/read)
dataset_index=hdf_sd_nametoindex(fileID, dataset_name)
datasetID=hdf_sd_select(fileID, dataset_index)
....
hdf_sd_endaccess,datasetID
hdf_sd_end,Fileid

Thanks,
Rona
0
wingsy1212
12/16/2016 3:51:26 PM
comp.lang.idl-pvwave 12260 articles. 2 followers. Post Follow

0 Replies
193 Views

Similar Articles

[PageSpeed] 26

Reply: