[Esip-documentation] how to describe flag_values, flag_meanings in netCDF

Bob Simons - NOAA Federal via Esip-documentation esip-documentation at lists.esipfed.org
Fri May 23 14:17:28 EDT 2014


On 2014-05-23 11:01 AM, Armstrong, Edward M (398M) wrote:
> HI Bob,
>
> A byte array in a metadata attribute ?? That does not make sense, or 
> I’m not understudying you.  Let’s both check the CF documentation.
I think so.
The documentation says "The |flag_values | attribute is the same type as 
the variable to which it is attached, and contains a list of the 
possible flag values."
Hence a list of (e.g.,) bytes, not a comma-separated String.
And note that the example is

current_speed_qc:flag_values = 0b, 1b, 2b ;

not

current_speed_qc:flag_values = "0b, 1b, 2b" ;
(if it were a String)

---
And note that the netcdf-java documentation for class Attribute lists 
among the constructors
|*Attribute 
<https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/v4.3/javadocAll/ucar/nc2/Attribute.html#Attribute%28java.lang.String,%20java.util.List%29>*(java.lang.String name, 
java.util.List values)|
"Construct attribute with list of String or Number values."
See 
https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/v4.3/javadocAll/ucar/nc2/Attribute.html

>
>
> On May 23, 2014, at 10:32 AM, Bob Simons - NOAA Federal via 
> Esip-documentation <esip-documentation at lists.esipfed.org 
> <mailto:esip-documentation at lists.esipfed.org>> wrote:
>
>>
>> On 2014-05-23 10:26 AM, Armstrong, Edward M (398M) wrote:
>>> Looks good to me.
>>>
>>> The flag_values is of the same “type” as the variables so you often 
>>> see (if this were a byte array)
>> Assuming the flag variable uses data type = bytes,
>> flag_values needs to be an actual byte array, not just a String that 
>> looks like it.
>> I don't know what library/system you are working with, so I'm not 
>> sure how you will specify that.
>>
>>>
>>>
>>>>    <attribute name="flag_values" value="0b, 1b, 2b”/>
>>>
>>> On May 23, 2014, at 10:18 AM, Anna Milan - NOAA Federal via 
>>> Esip-documentation <esip-documentation at lists.esipfed.org 
>>> <mailto:esip-documentation at lists.esipfed.org>> wrote:
>>>
>>>> Update - added commas b/t flag_values
>>>>
>>>>     <attribute name="flag_values" value="0, 1, 2"/>
>>>>     <attribute name="flag_meanings" 
>>>> value="One_or_more_measurements_are_backfilled_from_the_spacecraft_recorder 
>>>> Packet_time_is_in_the_future Packet_time_is_older_than_the_threshold"/>
>>>>
>>>>
>>>> Anna
>>>> *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
>>>> Anna.Milan at noaa.gov <mailto:Anna.Milan at noaa.gov>, 303-497-5099
>>>> NOAA/NESDIS/NGDC
>>>>
>>>> http://www.ngdc.noaa.gov/metadata/emma
>>>> *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
>>>>
>>>>
>>>> On Fri, May 23, 2014 at 11:17 AM, Anna Milan - NOAA Federal 
>>>> <anna.milan at noaa.gov <mailto:anna.milan at noaa.gov>> wrote:
>>>>
>>>>     Ok.
>>>>     Thanks for all of your feedback! Does this look more compliant?
>>>>
>>>>     <attribute name="flag_values" value="0 1 2"/>
>>>>         <attribute name="flag_meanings"
>>>>     value="One_or_more_measurements_are_backfilled_from_the_spacecraft_recorder
>>>>     Packet_time_is_in_the_future
>>>>     Packet_time_is_older_than_the_threshold"/>
>>>>
>>>>     Anna
>>>>     *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
>>>>     Anna.Milan at noaa.gov <mailto:Anna.Milan at noaa.gov>, 303-497-5099
>>>>     <tel:303-497-5099>
>>>>     NOAA/NESDIS/NGDC
>>>>
>>>>     http://www.ngdc.noaa.gov/metadata/emma
>>>>     *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
>>>>
>>>>
>>>>     On Fri, May 23, 2014 at 11:09 AM, Bob Simons - NOAA Federal via
>>>>     Esip-documentation <esip-documentation at lists.esipfed.org
>>>>     <mailto:esip-documentation at lists.esipfed.org>> wrote:
>>>>
>>>>
>>>>         On 2014-05-23 9:45 AM, Anna Milan - NOAA Federal via
>>>>         Esip-documentation wrote:
>>>>>         Howdy All,
>>>>>         Is this the most appropriate way to describe flag_values,
>>>>>         flag_meanings?
>>>>>
>>>>>         <attribute name="flag_values" value="0, 1, 2, 3, 4, 5, 6, 7"/>
>>>>>           <attribute name="flag_meanings" value="One or more
>>>>>         measurements are back filled from the spacecraft recorder,
>>>>>         Packet time is in the future, Packet time is older than
>>>>>         the threshold"/>
>>>>
>>>>         Not exactly.
>>>>         The flag_values (and the flag variable) are usually an
>>>>         array of bytes, not a comma separated string.
>>>>         The flag_meanings need to be something like
>>>>         "One_or_more_measurements_are_back_filled_from_the_spacecraft_recorder
>>>>         Packet_time_is_in_the_future
>>>>         Packet_time_is_older_than_the_threshold".
>>>>         The number of flag_values must equal the number of
>>>>         flag_meanings.
>>>>
>>>>         Those are terms from the CF standard. See
>>>>         http://cfconventions.org/1.6.html#flags for details.
>>>>
>>>>         It might be better to direct future questions about them to
>>>>         the CF mailing list.
>>>>
>>>>>         Thanks in advance....
>>>>>         Anna
>>>>>         *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
>>>>>         Anna.Milan at noaa.gov <mailto:Anna.Milan at noaa.gov>,
>>>>>         303-497-5099 <tel:303-497-5099>
>>>>>         NOAA/NESDIS/NGDC
>>>>>
>>>>>         http://www.ngdc.noaa.gov/metadata/emma
>>>>>         *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
>>>>>
>>>>>
>>>>>         _______________________________________________
>>>>>         Esip-documentation mailing list
>>>>>         Esip-documentation at lists.esipfed.org  <mailto:Esip-documentation at lists.esipfed.org>
>>>>>         http://www.lists.esipfed.org/mailman/listinfo/esip-documentation
>>>>
>>>>         -- 
>>>>         Sincerely,
>>>>
>>>>         Bob Simons
>>>>         IT Specialist
>>>>         Environmental Research Division
>>>>         NOAA Southwest Fisheries Science Center
>>>>         1352 Lighthouse Ave
>>>>         Pacific Grove, CA 93950-2079
>>>>         Phone: (831)658-3205 <tel:%28831%29658-3205>
>>>>         Fax: (831)648-8440 <tel:%28831%29648-8440>
>>>>         Email: bob.simons at noaa.gov <mailto:bob.simons at noaa.gov>
>>>>
>>>>         The contents of this message are mine personally and
>>>>         do not necessarily reflect any position of the
>>>>         Government or the National Oceanic and Atmospheric
>>>>         Administration.
>>>>         <>< <>< <>< <>< <>< <>< <>< <>< <>< <><
>>>>
>>>>
>>>>         _______________________________________________
>>>>         Esip-documentation mailing list
>>>>         Esip-documentation at lists.esipfed.org
>>>>         <mailto:Esip-documentation at lists.esipfed.org>
>>>>         http://www.lists.esipfed.org/mailman/listinfo/esip-documentation
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Esip-documentation mailing list
>>>> Esip-documentation at lists.esipfed.org 
>>>> <mailto:Esip-documentation at lists.esipfed.org>
>>>> http://www.lists.esipfed.org/mailman/listinfo/esip-documentation
>>>
>>> -ed
>>>
>>> Ed Armstrong
>>> JPL Physical Oceanography DAAC
>>> 818 519-7607
>>>
>>>
>>>
>>
>> -- 
>> Sincerely,
>>
>> Bob Simons
>> IT Specialist
>> Environmental Research Division
>> NOAA Southwest Fisheries Science Center
>> 1352 Lighthouse Ave
>> Pacific Grove, CA 93950-2079
>> Phone: (831)658-3205
>> Fax: (831)648-8440
>> Email: bob.simons at noaa.gov
>>
>> The contents of this message are mine personally and
>> do not necessarily reflect any position of the
>> Government or the National Oceanic and Atmospheric
>> Administration.
>> <>< <>< <>< <>< <>< <>< <>< <>< <>< <><
>>
>> _______________________________________________
>> Esip-documentation mailing list
>> Esip-documentation at lists.esipfed.org 
>> <mailto:Esip-documentation at lists.esipfed.org>
>> http://www.lists.esipfed.org/mailman/listinfo/esip-documentation
>
> -ed
>
> Ed Armstrong
> JPL Physical Oceanography DAAC
> 818 519-7607
>
>
>

-- 
Sincerely,

Bob Simons
IT Specialist
Environmental Research Division
NOAA Southwest Fisheries Science Center
1352 Lighthouse Ave
Pacific Grove, CA 93950-2079
Phone: (831)658-3205
Fax: (831)648-8440
Email: bob.simons at noaa.gov

The contents of this message are mine personally and
do not necessarily reflect any position of the
Government or the National Oceanic and Atmospheric
Administration.
<>< <>< <>< <>< <>< <>< <>< <>< <>< <><

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.esipfed.org/pipermail/esip-documentation/attachments/20140523/34d556f0/attachment-0001.html>


More information about the Esip-documentation mailing list