[CF-metadata] vertical coordinates and positive attributes
Dear John
I think your interpretation of the standard is correct. It would be useful to
record this is a FAQ - what do you think? Maybe it isn't frequently asked,
but it could be asked again. I am sure there are plenty of other questions
which have come up and been answered on this email list that would likewise
be worth recording for reference. I add some comments below.
The positive attribute was inherited from COARDS, which depended on it and
units to identify the vertical coordinate variable. COARDS did not have aux
coord vars, standard names or the axis attribute.
> 1) What are the exact conditions that _require_ the positive attribute?
> I believe they are: a) variable is a coordinate variable => '1-dimensional netCDF variables whose dimension names are identical to their variable names', OR is an auxiliary coordinate variable; b) the variable represents a vertical axis in the real world; c) units are not pressure.
>
> 2) What is appropriate application behavior if standard_name conflicts with the positive attribute? For example, standard_name=depth, but positive=up -- this is a conflict, since depth for example is defined as "Depth is the vertical distance below the surface."
> I think this situation is undefined, but given the ambiguity of the definition with respect to sign, perhaps the positive attribute should be treated as definitive.
I would favour the standard name if there is one, because standard names are
always defined to include a sign convention if relevant. In this case, depth
and height are distinct standard names, and the only difference between their
definitions is the sign. The positive attribute would be wrong in this example,
I think.
> 3) Can positive attribute be applied to a variable that is not a (auxiliary) coordinate variable? The existing language says "This attribute may be applied to either coordinate variables or auxillary coordinate variables that contain vertical coordinate data.", which is silent about just regular data, and the attributes list says it only applies to Coordinate variables.
> It should be OK; I see nothing expressly prohibiting this, either in the spec or in undesirable side effects. Often depth (for example) is just a measured value, and is not used in the file as a coordinate axis. And I think it is common to use positive for any vertically-oriented variable; as long as that variable is not a coordinate variable already (1D name(name)), the system will not promote it to one just based on the positive attribute. And, everyone does it.
It is allowed because CF in general allows any attributes that it does not
standardise to be used in any way the user likes. The use of this attribute
on data variable is not standardised so CF does not say what it would mean.
If there is a standard name, the positive attribute isn't necessary, because
the standard name itself implies the sign convention (as above).
> 4) Can an application infer a vertical axis entirely from the existence of axis=Z or standard_name=depth or altitude? Or does it have to check the units/positive to confirm?
> If I understand correctly, while conformance with CF requires the units/positive attributes as described above, the intent of the axis and standard_name options is to make it possible for an application to confirm a vertical coordinate as soon as it finds either of those indications.
That's right, but the units and positive attribute are mandatory, for backward
conformance with COARDS, whereas the standard_name and axis are optional. So it
is more reliable to use the units and positive attribute to identify the
vertical axis, although less convenient than axis='Z'.
Best wishes
Jonathan
Received on Wed Jan 29 2014 - 05:26:14 GMT
This archive was generated by hypermail 2.3.0
: Tue Sep 13 2022 - 23:02:41 BST