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

Home » Public Forums » archive » Re: NCDF_ATTPUT _FillValue problem for string arrays?
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: NCDF_ATTPUT _FillValue problem for string arrays? [message #67140 is a reply to message #67134] Mon, 06 July 2009 14:41 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
F�LDY Lajos wrote:
>
>
>
> NCDF_VARDEF needs dimension ID, not dimension size. The following code
> works for me:
>
> ncid=ncdf_create('test.nc', /clobber)
> dim32=ncdf_dimdef(ncid, 'dim1', 32)
> n_absorbers_dimid=ncdf_dimdef(ncid, 'dim2', 9)
> varid = ncdf_vardef( ncid, 'absorber_units_name',
> [dim32,n_absorbers_dimid], /char)
> ncdf_attput, ncid, varid, '_fillvalue', ' '
> ncdf_control, ncid, /endef
> ncdf_close, ncid

Just a final followup - I changed the definition of the offending attribute to
"_fillvalue" in my production code and now the ncdf_attput works as expected.

thanks again. I have little hair left to tear out when these annoyances arise so you've
saved me a tuft or two! :o)

cheers,

paulv

p.s. I should note that the futzing up of the _fillvalue attribute *only* occurred for
character variable output. Any other datatype (byte, long, float, double etc) handled the
camel case attribute name fine. Weird.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Are user-defined private methods possible?
Next Topic: IDL 7.1 dialog_pickfile segmentation fault

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

Current Time: Thu Oct 09 23:20:28 PDT 2025

Total time taken to generate the page: 1.43959 seconds