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 #67212 is a reply to message #67140] Wed, 08 July 2009 06:55 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Paul van Delst schrieb:
> 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.
>

Not really. Now you just use the internal defined _FillValue of the
netCDF format. You have now just added an additional attribute which is
not used as initial value for creating the netCDF variable.

That var is similiar to make_array(10,value=FillValue, /string)

Also it breaks the standard definition of attributes but this would make
only problems when you share your data.

And we have run in this problems too. using a double fill var and having
float arrays makes also some fun. q_icg_struct was changed in 2003 to
care on that.
(since idl6.0 netCDF3.5.0 fill values must checked to be same type as
param. missing value is checked too.)


cheers
Reimar



> 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: Fri Oct 10 19:57:35 PDT 2025

Total time taken to generate the page: 1.67766 seconds