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

Re: Conventions

Harvey,

> ...
> Regarding valid_range.  The generic conventions clearly state that
> the type must match that of the variable.  If if does not, then
> there should be an error message. ...

One reason the issue of the type of valid_range keeps coming up is
byte data type and the question of how to represent whether bytes are
to be interpreted as signed or unsigned data.  An exception in the
case of bytes is specifically allowed in the Users Guide documentation
for valid_range:

    ... The type of each valid_range, valid_min and valid_max
    attribute should match the type of its variable (except that for
    byte data, these can be of a signed integral type to specify the
    intended range).

The problem is that you can't have valid_range be of the same type as
the variable (byte), because then it won't be able to represent values
in the entire range from the minimum signed byte (-128) to the
maximum unsigned byte (255), needed to represent whether the values
are intended to be interpreted as signed or unsigned.

--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