All,
May I request that Netcdf names beginning with a digit be handled as
a special exception, requiring some kind of permission mode to be
set before the API will allow these variables to be created? In
this way the default behavior for most users would be the same as in
previous versions.
I think it is generally desirable to have Netcdf names follow the
same rigor and restrictions as variable names in common programming
languages. Indeed Fortran, NCL, C/C++, Grads, and one or more
Netcdf conventions all require the first character alphabetic or
sometimes underscore. The original authors of the Netcdf specs had
something like this in mind when they formalized this restriction.
Now I think the alpha restriction is important in practice for
several diffuse reasons. Primarily, it will reduce compatibility
problems over time between producers and consumers of Netcdf data,
because of conventions. Also, it's common practice to copy variable
names between files and program code, aiding clarity. Also, the
occurrence of non-letters at the start of a name can be helpful as
an early warning of malfunctions.
In summary, I request the creation of a non-default exception mode
to take care of applications like ncl_convert2nc. The documentation
should retain the traditional restriction to letters and underscore
only. The use of leading digits and the exception mode should also
be documented but called "deprecated".
I see this as a small amount of work now to save more in distributed
problems later. Thanks for your consideration.
Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.cdc.noaa.gov/
Ed Hartnett wrote on June 18:
David Brown <dbrown@xxxxxxxx> writes:
Hi,
When we recently relinked our software products, NCL and PyNIO, with
the newly released version of
the NetCDF 4.0 library we discovered that there seems to have been a
change in the actual, as opposed
to the documented, rules for variable names. Specifically it appears
that names that begin with a digit can no longer
be written to NetCDF files.
Howdy All!
As David points out, creating names beginning with a digit are no
longer allowed in version 3.6.3 and version 4.0. This is in accordance
with the documented rules, but was never enforced in previous
versions.
We are changing the code (and the documentation) so that names
beginning with a digit are allowed again. Users should note that such
names also violate the CF conventions, and possibly other conventions.
I'll announce here when the code has been changed, and those who need
to create objects with names that begin with a digit can grab the
daily snapshot.
Thanks,
Ed