⇐ ⇒

[CF-metadata] same attribute name in variable and in global

From: Andrew Barna <abarna>
Date: Fri, 15 Mar 2019 07:50:56 -0700

HI CF Folks,

This question comes at at interesting time for the group I work in (
https://cchdo.ucsd.edu). We are in the process of converting our data
holdings form WOCE and more recent hydrophobic programs into a CF compliant
netcdf. We are also taking the opportunity to add the ACDD type attributes
for knowing the "who" of our various data. However, we have the problem of
almost all the variables in our files being being almost totally
independent, different PI, different funding, etc.. this even applies to
different instruments placed on the CTD. Often the only commonality is the
specific niskin the sample came from.

To cover our use case, the plan is to push many of the "global" ACDD
attributes to the variable level and then have various combinatoric rules
for making the global level attribute of the same name, e.g. all the
variable level creator_name values would be concatenated for the
global level creator_name attribute.

I don't really has a specific request or recommendation, but want the list
to be aware that this is a problem that others encounter, especially in
collaborative work.

-Andrew Barna

On Fri, Mar 15, 2019 at 7:20 AM Jim Biard <jbiard at cicsnc.org> wrote:

> Lars,
>
>
> Good catch! It seems that history may need to be an exception to such a
> rule. A comment attribute should also probably be considered to be an
> exception as well. Or the concept needs refinement.
>
>
> Jim
>
>
> On 3/15/19 8:48 AM, B?rring Lars wrote:
>
> Dear all,
>
> I have come across many CMIP5 files that have the same attribute [name]
> attached to the data variable as found in the globals.
>
> In particular it seems that CMOR was writing variable processing history
> attached to the variable, and more general file processing in the global
> history.
>
> I have also seen that "comment" sometimes occur both as global and as
> variable attribute.
>
> If such a duplication occurs, CF writes:
> "When an attribute appears both globally and as a variable attribute, the
> variable?s version has precedence."
>
> My interpretation of this is that if there are contradictory information
> then the variable's attribute has precedence, but otherwise it does not
> invalidate or overshadows what is in the global attribute.
>
> However, the data model presented in the GMD paper (
> https://www.geosci-model-dev.net/10/4619/2017/ page 4629, [page 11],
> under "4.1 The field construct") presents a more restrictive
> interpretation:
> "In the data model, we consider that netCDF global file attributes apply
> to every data variable in the file, except where they are superseded by
> netCDF data variable attributes with the same name."
>
> I understand this to mean that if the same attributes (e.g. comment or
> history) is present both as global and variable attribute, then the global
> attribute is overshadowed (as if it did not exist at all)?
>
> Is this correct? If so, is this the best solution?
>
> Would not concatenating the information contained in each (putting the
> variable text first) be a more appropriate way to resolve the situation
> (and thus specify in the data model)?
>
>
> Kind regards,
> Lars
>
> --
> Lars B?rring
>
> FDr, Forskare
> PhD, Research Scientist
>
> SMHI / Swedish Meteorological and Hydrological Institute
> Rossby Centre
> SE - 601 76 NORRK?PING
> http://www.smhi.se
>
> E-post / Email: lars.barring at smhi.se
> Tel / Phone: +46 (0)11 495 8604
> Fax: +46 (0)11 495 8001
> Bes?ksadress / Visiting address: Folkborgsv?gen 17
>
> _______________________________________________
> CF-metadata mailing listCF-metadata at cgd.ucar.eduhttp://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
>
> --
> [image: CICS-NC] <http://www.cicsnc.org/> Visit us on
> Facebook <http://www.facebook.com/cicsnc> *Jim Biard*
> *Research Scholar*
> Cooperative Institute for Climate and Satellites NC <http://cicsnc.org/>
> North Carolina State University <http://ncsu.edu/>
> NOAA National Centers for Environmental Information
> <http://ncdc.noaa.gov/>
> *formerly NOAA?s National Climatic Data Center*
> 151 Patton Ave, Asheville, NC 28801
> e: jbiard at cicsnc.org
> o: +1 828 271 4900
>
> *Connect with us on Facebook for climate
> <https://www.facebook.com/NOAANCEIclimate> and ocean and geophysics
> <https://www.facebook.com/NOAANCEIoceangeo> information, and follow us on
> Twitter at _at_NOAANCEIclimate <https://twitter.com/NOAANCEIclimate> and
> _at_NOAANCEIocngeo <https://twitter.com/NOAANCEIocngeo>. *
> _______________________________________________
> CF-metadata mailing list
> CF-metadata at cgd.ucar.edu
> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cgd.ucar.edu/pipermail/cf-metadata/attachments/20190315/53755ad2/attachment-0001.html>
Received on Fri Mar 15 2019 - 08:50:56 GMT

This archive was generated by hypermail 2.3.0 : Tue Sep 13 2022 - 23:02:43 BST

⇐ ⇒