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

Home » Public Forums » archive » Can't exit DEFINE mode in netCDF File
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: Can't exit DEFINE mode in netCDF File [message #68266 is a reply to message #68119] Tue, 06 October 2009 15:33 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul van Delst writes:

> FĂ–LDY Lajos came up with a solution,
>
>
>> I have found the solution: _FillValue needs to be the same type as the
>> variable. ' ' is an IDL string, which is converted to something, probably
>> BYTE. So let's add an explicite /CHAR to ncdf_attput:
>>
>> 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', ' ', /CHAR
>> ncdf_control, ncid, /endef
>> ncdf_close, ncid
>>
>> It works now! :-)
>>
>> regards,
>> lajos
>
> Does that help?

Ah! Yes, I remember reading that and thinking it was too
esoteric for an article on my web page. I should have known
better. I won't make that mistake again!

Where is it written, though, that the _FillValue attribute has
to be the same data type as the variable it is an attribute of?
And why doesn't *that* cause an error, instead of this action at
a distance thing?

I'm not sure this was worth three hours of effort, not counting the
time it will take to write the damn article. :-(

Thanks for the help.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[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: interpolation of irregular satellite data
Next Topic: Re: IDLDE and java crashes

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

Current Time: Wed Oct 08 19:17:18 PDT 2025

Total time taken to generate the page: 0.00468 seconds