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

Home » Public Forums » archive » Re: frustrated by hdf_sd_adddata
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: frustrated by hdf_sd_adddata [message #24182] Thu, 15 March 2001 10:52 Go to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
George McCabe wrote:
> 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.

George,

Does the following example work on your system?

hdfid = hdf_sd_start('test.hdf')
varid = hdf_sd_create(hdfid, 'data', [256, 256], /float)
hdf_sd_adddata, varid, dist(256)
hdf_sd_endaccess, varid
hdf_sd_end, hdfid

If it does, the HDF interface on you platform is working. You might be
having a problem with the definition of the START and COUNT keywords.
The following is from the IDL 5.3 online documentation:

---begin quote---
START

Set this keyword to a vector that contains the starting position for the
data. The default position is [0, 0, ..., 0].

COUNT

Set this keyword to a vector of counts (i.e., the number of items) to be
written in each dimension. The default is to write all available data.

STRIDE

Set this keyword to a vector that contains the strides, or sampling
intervals, between accessed values of the NetCDF variable. The default
stride vector is that for a contiguous write: [0, 0, ..., 0].
---end quote---

I'd try and reduce the code to the smallest number of lines which
reproduces the error. This process often makes the source of the error
obvious.

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley
[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
Previous Topic: Regular Expressions
Next Topic: Gridding/Interpolating a large image

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

Current Time: Wed Oct 08 11:00:12 PDT 2025

Total time taken to generate the page: 0.00395 seconds