cf-convention / vocabularies

Issues and source files for CF controlled vocabularies
3 stars 1 forks source link

standard_name unique in a dataset? #132

Closed jonathanlilly closed 2 years ago

jonathanlilly commented 2 years ago

Hello,

I have a question about the application of standard names, and I haven't found an answer in the conventions.

Let's say I have the same quantity, "time" for example, which has a standard name but which pertains to more than one variable in the same dataset. For example, I may have a physical quantity and I may wish to include it as well as a version to which cell_methods has been applied, as in a mean.

It is recommended to have more than one variable with the same standard name, provided the distinction is otherwise clear? In other words, is standard_name pertaining to the variable or to the quantity which it represents?

Thank you!

JonathanGregory commented 2 years ago

Dear Jonathan

Thanks for your question. Yes, it is perfectly fine and usual to have more than one variable with a given standard_name in a file. The standard_name is only of several components of CF metadata, of course. Other components, such as cell_methods, may be used to distinguish variables that have the same standard_name. That's also quite common; for example, daily mean and daily max air temperature have the same standard_name and are distinguished by cell_methods.

Best wishes

Jonathan

jonathanlilly commented 2 years ago

Perfect! Thank you so much for the quick response.

May I request that this be written explicitly in the documentation? I couldn't find clarification on this point, and there was a sentence (from 3.3)

"For this reason an optional mechanism for uniquely associating each variable with a standard name is provided."

where the word "uniquely" could be interpreted as meaning unique within the dataset.

JonathanGregory commented 2 years ago

That's a good point. I agree that the existing wording could be misleading. I will draft a correction. Thanks.

JonathanGregory commented 2 years ago

I have started https://github.com/cf-convention/cf-conventions/issues/366 to correct this defect, so I'll close this issue. Thank you, @jonathanlilly.