#167: Use of valid_range to indicate unsigned integers
-----------------------------------------+------------------------------
 Reporter:  Dave.Allured                 |      Owner:  cf-conventions@…
     Type:  defect                       |     Status:  new
 Priority:  medium                       |  Milestone:
Component:  cf-conventions               |    Version:
 Keywords:  unsigned integer deprecated  |
-----------------------------------------+------------------------------
 This responds to the recent request to add type short to the use of
 valid_range etc. to indicate unsigned integers.

 Same as the proposed language in ticket #166, type short is included to
 document known usage.  However, this proposal also suggests that this
 entire method for unsigned integers should be fully deprecated, in light
 of more straightforward and readily available storage methods.

 The current CF 1.7 document, section 2.2 (Data Types) includes this
 sentence:

 {{{
 It is possible to treat the byte type as unsigned by using
 the NUG convention of indicating the unsigned range
 using the valid_min, valid_max, or valid_range attributes.
 }}}

 Text of new proposal.  Insert paragraph break, consistent with new
 paragraph breaks in ticket #166.  Replace the sentence with this
 paragraph:

 {{{
 2.2.1  Unsigned Integers

 It is possible to treat the byte and short types as unsigned
 by using the NUG convention of indicating the unsigned
 range using the valid_min, valid_max, or valid_range
 attributes.  However, the translation between signed and
 unsigned values is not well defined, and subject to
 interpretation.  This usage is deprecated as of CF version
 1.8.  Unsigned integer data should be stored with a signed
 numeric type of sufficient range, or with native unsigned
 integers in one of the newer netCDF file formats.
 }}}

--
Ticket URL: <https://cf-pcmdi.llnl.gov/trac/ticket/167>
CF Metadata <http://cf-convention.github.io/>
CF Metadata

Reply via email to