Re: [netcdfgroup] Allowed characters in variable names?

  • To: Heiko Klein <Heiko.Klein@xxxxxx>
  • Subject: Re: [netcdfgroup] Allowed characters in variable names?
  • From: Tom Whittaker <whittaker@xxxxxxxx>
  • Date: Thu, 12 Aug 2010 09:12:49 -0500
Hi Heiko....

If you are interested in following CF conventions (and we all who
write applications that use NetCDF files hope you are), the document
here:
<http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.4/cf-conventions.html>

under "Naming conventions" states that variables must begin with a letter.

Hope that helps...

tom

On Thu, Aug 12, 2010 at 6:10 AM, Heiko Klein <Heiko.Klein@xxxxxx> 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/



-- 
Tom Whittaker
University of Wisconsin-Madison
Space Science & Engineering Center (SSEC)
Cooperative Institute for Meteorological Satellite Studies (CIMSS)
1225 W. Dayton Street
Madison, WI  53706  USA
ph: +1 608 262 2759



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