Re: HDF_SD_GETACCESS: No content in variable, error [message #71806 is a reply to message #71805] |
Wed, 21 July 2010 04:32   |
d.poreh
Messages: 406 Registered: October 2007
|
Senior Member |
|
|
On Jul 21, 4:17 am, aa8533 <matthew.blackett.coven...@googlemail.com>
wrote:
> Hi - I'm trying to make a program which automatically runs through
> 100s of images (MODIS Fire data) and extracts data at a particular
> point. The program works fine where there is data to extract (in the
> case below, when there is data in FP_Sample) but halts for an image
> where there is none with message "Array dimensions must be greater
> than 0".
>
> Extract of code is:
>
> sd=hdf_sd_start(fileName)
> index=hdf_sd_nametoindex(sd,'FP_sample')
> sds=hdf_sd_select(sd,index)
> hdf_sd_getdata,sds,sample <------------------ Halts with message
> here
>
> Is there a way to test the size of the variable (in this case Sample)
> and if, say it's -1 (no data) then skip the last line of this code?
>
> Would very much appreciate any help.
>
> Matt
can you post entire code from beginning to see what happen?
|
|
|