Re: [netcdfgroup] Allowed characters in variable names?

Heiko Klein <Heiko.Klein@xxxxxx> asked:
> Are names like '2t' forbidden in netcdf, or is this a bug in 3.6.3 ...?

A name like '2t' is permitted by the netCDF library and file format
standard, though disallowed by some conventions, such as the CF
conventions.  The first character of a name may be alphanumeric, as
documented here in the file format description

  http://www.unidata.ucar.edu/netcdf/docs/netcdf.html#File-Format

where it says

  Note on names: Earlier versions of the netCDF C-library reference
  implementation enforced a more restricted set of characters in
  creating new names, but permitted reading names containing arbitrary
  bytes. This specification extends the permitted characters in names
  to include multi-byte UTF-8 encoded Unicode and additional printing
  characters from the US-ASCII alphabet. The first character of a name
  must be alphanumeric, a multi-byte UTF-8 character, or '_' (reserved
  for special names with meaning to implementations, such as the
  '_FillValue' attribute). Subsequent characters may also include
  printing special characters, except for '/' which is not allowed in
  names. Names that have trailing space characters are also not
  permitted.

A bug in netCDF 3.6.3 and 4.0 disallowed names like '2t', but that bug
was fixed in release 4.0.1 and subsequent releases, including the
current 4.1.1.

--Russ



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