[CF-metadata] Add new integer types to CF?
chris.barker at noaa.gov
Fri Sep 22 10:43:22 MDT 2017
Sorry to not look deeper and see if this is well specified in the docs
integer or byte variables that are to be interpreted as unsigned must
> have the attribute _Unsigned = "true".
What does "interpreted as unsigned" mean? Options off the top of my head:
A) They are used in the same way, but negative values are invalid.
B) The actual bits in the data type are actually in the unsigned form, and
should be cast to an unsigned type to get the right values.
The different, is, for instance, that a 1-byte truly unsigned int can hold
values from 0 to 255, whereas a signed byte int can hold values from -127
if (A), then it doesn't matter much, really, data readers will simply read
the values, and they won't hold any negative values, they really don't need
to do anything special when reading manipulating or displaying the data.
if (B), the data readers need to be very careful to do the right thing.
> On Fri, Sep 22, 2017 at 1:10 AM, Chris Barker <chris.barker at noaa.gov>
>> "One byte numeric data should be stored using the byte
>> or unsigned byte data type."
>>> It too is copied from CF 1.7, and I think its intent was to tell
>>> people to store 1-byte numeric data as type byte not type char.
>>> With that rationale, if the sentence was in 1.7 then
>>> it should probably be in 1.8,
>> yup --it's clear to me, and not annoyingly redundant.
>> The truth is that char type IS used a lot on old C code for numeric data.
>>> although I'll go with
>>> the consensus.
>>> Charlie Zender, Earth System Sci. & Computer Sci.
>>> University of California, Irvine 949-891-2429 )'(
>>> CF-metadata mailing list
>>> CF-metadata at cgd.ucar.edu
>> Christopher Barker, Ph.D.
>> Emergency Response Division
>> NOAA/NOS/OR&R (206) 526-6959 voice
>> 7600 Sand Point Way NE
>> (206) 526-6329 fax
>> Seattle, WA 98115 (206) 526-6317 main reception
>> Chris.Barker at noaa.gov
>> CF-metadata mailing list
>> CF-metadata at cgd.ucar.edu
> Dr. Richard P. Signell (508) 457-2229
> USGS, 384 Woods Hole Rd.
> Woods Hole, MA 02543
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CF-metadata