Home »
Public Forums »
archive »
About "Invalid HDF file or filename" using hdf_sd_start on a valid HDF file due to loop through too many hdf files
| About "Invalid HDF file or filename" using hdf_sd_start on a valid HDF file due to loop through too many hdf files [message #93999] |
Fri, 16 December 2016 07:51 |
wingsy1212
Messages: 1 Registered: December 2016
|
Junior Member |
|
|
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
|
|
|
|
Current Time: Fri Nov 28 05:07:34 PST 2025
Total time taken to generate the page: 0.00771 seconds