NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: [netcdfgroup] Allowed characters in variable names?

Hieko-
You can have leading digits in variable names.
The only place this should be an issue is when
using ncgen with a .cdl file. In a .cdl file,
you need to prefix the digit with a backslash
character.  For your example, you need to
write the variable as \2t or \10u

=Dennis Heimbigner
 Unidata

Heiko Klein wrote:
I'm converting some grib data to netcdf. For variable names, I use the shortNames defined in my grib-reader (grib_api), which in some cases start with numeric characters, e.g. '2t' or '10u'.

This works well with 3.6.2, but when run on another machine (ubuntu lucid, netcdf 3.6.3?), I get an error:

NetCDF: Name contains illegal characters


I've seen that some of the variable-name code has been changed in 3.6.3 for UTF-8: http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#fv22 but I haven't found out if the first character of a variable must be alphabetic (except in a very old user-guide at http://www.strw.leidenuniv.nl/~sfinx/netcdf9.html)


Are names like '2t' forbidden in netcdf, or is this a bug in 3.6.3, or is this a bug in my program, which just propagates to the netcdf error message?



Best regards,

Heiko

_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: http://www.unidata.ucar.edu/mailing_lists/



  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: