Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: Dimensions with size 0

Harvey,

I appreciate your comments on the usefulness of dimension lengths of
zero.  As you pointed out, in netCDF-3, the unlimited dimension is
permitted to have zero length to indicate no records have been
written, and in netCDF-4 multiple unlimited dimensions will be
permitted, any or all of which can have a length of zero.

It would be difficult to further generalize this to cover fixed-size
dimensions as well.  Sometimes early designs and backward
compatibility constraints together make some kinds of otherwise
desirable changes impractical, even if they appear to be desirable.
This is one of those cases, since there are lots of existing
applications that equate specifying a dimension size of zero with
defining an unlimited dimension, so I think netCDF-4 must be backward
compatible with netCDF-3 in this respect.

For a close analogy, see Guido van Rossum's article comparing how
fiction authors and language designers paint themselves into a corner
in their early work in his "The Harry Potter Theory of Programming
Language Design":

  http://www.artima.com/weblogs/viewpost.jsp?thread=123234

--Russ



 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690