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

Home » Public Forums » archive » Re: netCDf problem in IDl 6.0
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: netCDf problem in IDl 6.0 [message #36630] Fri, 10 October 2003 11:41
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Mark Hadfield wrote:

> Bruce A. Toth wrote:
>
>> The following netcdf call worked fine inder IDL 5.6, but I get an error
>> under IDL 6.0.
>>
>> ncdf_attput,id,'BAT file: ',/GLOBAL,file
>>
>> The error produced:
>> % NCDF_ATTPUT: Attribute write failed. (NC_ERROR=-59)
>>
>> After this error, the rest of the file gets written just fine.
>>
>> Any ideas?
>
> Well, netCDF error -59 is defined in ndetcdf.h thus:
>
> #define NC_EBADNAME (-59) /* Attribute or variable name
> contains illegal characters */
>
> The string 'BAT file: ' is an illegal netCDF attribute name for two
> reasons: 1) it includes spaces; 2) it uncludes a colon. (Not that I have
> bothered to look up the netCDF reference.)
>
> The puzzle is why it worked in IDL 5.6.

Dear all!

A hint for the puzzle from me.

A long time ago before netCDF3.0 this was defined in a different way.
You could use every character you want in the name. But sometimes it was
unpossible to use ncgen with a dumped nc file. This comes from some signs
which wasn't set up by the yacc to recompile the dump ascii file into a
netCDF binary, e.g. '<','>',' '

By version 3.0 there was a large beta phase where this rules were changed.
(We missed this too). We recognized it a bit later I can't remember at the
moment (it was the time where we started to use it on cray).

We aked unidata for help. Since this time they always provided a patch so
we could compile a netCDF3.x with the rules for the names before Version
3.0. This was only necessary for the models we have written because idl
uses the old netCDF2.4 version.

There will be a change in the rule for signs in 3.5.1 again.
It is planned for netCDF3.5.1 to add signs to the allowed which does not go
wrong with the ncgen.

If it is important for you to get these signs working you should ask rsi for
help!

regards

Reimar


--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
Re: netCDf problem in IDl 6.0 [message #36641 is a reply to message #36630] Thu, 09 October 2003 18:40 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Mark Hadfield wrote:
> The string 'BAT file: ' is an illegal netCDF attribute name for two
> reasons: 1) it includes spaces; 2) it uncludes a colon. (Not that I have
> bothered to look up the netCDF reference.)

Nor run my spelling checker.


--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: netCDf problem in IDl 6.0 [message #36642 is a reply to message #36641] Thu, 09 October 2003 18:04 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Bruce A. Toth wrote:

> The following netcdf call worked fine inder IDL 5.6, but I get an error
> under IDL 6.0.
>
> ncdf_attput,id,'BAT file: ',/GLOBAL,file
>
> The error produced:
> % NCDF_ATTPUT: Attribute write failed. (NC_ERROR=-59)
>
> After this error, the rest of the file gets written just fine.
>
> Any ideas?

Well, netCDF error -59 is defined in ndetcdf.h thus:

#define NC_EBADNAME (-59) /* Attribute or variable name
contains illegal characters */

The string 'BAT file: ' is an illegal netCDF attribute name for two
reasons: 1) it includes spaces; 2) it uncludes a colon. (Not that I have
bothered to look up the netCDF reference.)

The puzzle is why it worked in IDL 5.6.



--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: MPFIT2DPEAK with constraints
Next Topic: Re: Object graphics line thickness

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

Current Time: Sat Oct 11 12:57:54 PDT 2025

Total time taken to generate the page: 0.24075 seconds