[CF-metadata] Add new integer types to CF?

Chris Barker 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
already, but...

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

-CHB





> On Fri, Sep 22, 2017 at 1:10 AM, Chris Barker <chris.barker at noaa.gov>
> wrote:
>
>> LGTM.
>>
>> "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.
>>
>> -CHB
>>
>>
>>
>>> 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
>>> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
>>>
>>>
>>
>>
>> --
>>
>> Christopher Barker, Ph.D.
>> Oceanographer
>>
>> Emergency Response Division
>> NOAA/NOS/OR&R            (206) 526-6959   voice
>> 7600 Sand Point Way NE
>> <https://maps.google.com/?q=7600+Sand+Point+Way+NE&entry=gmail&source=g>
>>   (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
>> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
>>
>>
>
>
> --
> Dr. Richard P. Signell   (508) 457-2229
> USGS, 384 Woods Hole Rd.
> <https://maps.google.com/?q=384+Woods+Hole+Rd.+%C2%A0+Woods+Hole,+MA+02543&entry=gmail&source=g>
> Woods Hole, MA 02543
> <https://maps.google.com/?q=384+Woods+Hole+Rd.+%C2%A0+Woods+Hole,+MA+02543&entry=gmail&source=g>
> -1598
>



-- 

Christopher Barker, Ph.D.
Oceanographer

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...
URL: <http://mailman.cgd.ucar.edu/pipermail/cf-metadata/attachments/20170922/de88689a/attachment-0001.html>


More information about the CF-metadata mailing list