[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: frustrated by hdf_sd_adddata



james,

thanks for you many suggestions.

can you tell me what do you mean by 'corrupt'. though i think that i understand the use of idl's hdf procedures, my general experience is limited. i am curious about occurances of hdf file corruption.

this discussion is perhaps no longer relevant to my particular problem+solution. today, under a new idl session writing data to the same HDF file with the same code it works, so i am wondering about software interface errors, buffer problems, etc. maybe i'll just pretend it never happened.

thank you again,
george
 

James Kuyper wrote:

George McCabe wrote:
>
> hello,
>
> attempting to replace a subset of existing data in an HDF SD, using
> idl procedure hdf_sd_adddata, receive the following error which i can
> not readily diagnose -
> % HDF_SD_ADDDATA: Unable to write the specified HDF-SD slice.
>
> hdf opens, sd starts /RDWR ok, sd selected ok
> i have veryfied the size and order of the data variable, count and
> start keyword variables.
>
> help is appreciated,
> george

Some things to check:

You might not have access. What are the file permissions, owner, and
group membership?

The file may be corrupt. Can you view the HDF file with ncdump, or
similar utilities? Can you open it read-only, and view its contents
using HDF_SD_GETDATA?

Is this new code, or code that has already worked on a different file,
but is failing with this one?

You imply that you've already collected the following information, and
that it checked out OK, but maybe you've misinterpreted it - could you
tell us:

What values does HDF_SD_GETINFO give you for DIMS, HDF_TYPE, and TYPE?

What values are you giving HDF_SD_ADDDATA for START, COUNT, and STRIDE?

What do you get when you type

        HELP,mydata

where 'mydata' represents the name of the field you're passing as the
data argument to HDF_SD_ADDDATA?

-- 
George McCabe (CUofA)
NASA / Goddard Space Flight Center / Code 693 
Building 2, Room 151 / Greenbelt, MD 20771
voice: (301)286-8283, fax: (301)286-0212
george.mccabe@gsfc.nasa.gov