Opened 22 months ago

Last modified 21 months ago

#166 new enhancement

Add new integer types to CF — at Initial Version

Reported by: zender Owned by: cf-conventions@…
Priority: medium Milestone:
Component: cf-conventions Version:
Keywords: integer unsigned CDF5 Cc: zender@…

Description

This ticket would merge support for new integer types into CF 1.8. CF explicitly supports types char, byte, short, int, float, and double. The five "new" integer types it could support are: unsigned byte, unsigned short, unsigned int, int64, and unsigned int64. These new types are in netCDF3 (in the CDF5 encoding released in netCDF v. 4.4.0) and in netCDF4.

About 10 people deliberated on the CF list how best to do this. The original draft proposal included wording to clarify the treatment of unsigned integers for backward compatibility with CDF1 and CDF2, and to clarity that and which integer types are interchangable. It seems that these last two issues will require separate tickets, since their implementation received more unresolved debate. The addition of new types itself was not controversial and achieved consensus. Thus this shortened proposal, suggested by Dave Allured, that includes new sub-sub-sections intended to aid the discussion of the unresolved issues mentioned above.

The current CF 1.8 draft reads (Section 2.2):

2.2. Data Types

The netCDF data types char, byte, short, int, float or real, and double are
all acceptable. The char type is not intended for numeric data. One byte
numeric data should be stored using the byte data type. All integer types
are treated by the netCDF interface as signed. 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.

[Second paragraph on strings, not to be changed]

This ticket replaces that text with:

2.2.  Data Types

The netCDF data types char, byte, unsigned byte, short, unsigned short,
int, unsigned int, int64, unsigned int64, float or real, and double are all
acceptable.  The char type is not intended for numeric data.  One byte
numeric data should be stored using the byte or unsigned byte data types.

2.2.1  Unsigned Integers

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.

2.2.2  Character Strings

[Former paragraph on strings, unchanged]

Change History (0)

Note: See TracTickets for help on using tickets.