Skip to content

Commit

Permalink
Finish definitions and text responses to cf-convention#144. Will post…
Browse files Browse the repository at this point in the history
… tomorrow after sleeping on it.
  • Loading branch information
czender committed Sep 26, 2018
1 parent 3ceadfc commit 751de50
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
10 changes: 6 additions & 4 deletions ch01.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,21 @@ latitude dimension:: A dimension of a netCDF variable that has an associated lat

local apex group:: The nearest (to a referring group) ancestor group in which a dimension underlying an out-of-group coordinate is defined. The word "apex" refers to position of this group at the vertex of the tree of groups formed by it, the referring group, and the group where a coordinate is located.

longitude dimension:: A dimension of a netCDF variable that has an associated longitude coordinate variable.
location:: The position or path in a group hierarchy of a variable or dimension.

most proximal identifier:: The identifier of the element that can be reached via the shortest traversal of the file from the referring element following the rules set forth in the <<groups>>.
longitude dimension:: A dimension of a netCDF variable that has an associated longitude coordinate variable.

multidimensional coordinate variable:: An auxiliary coordinate variable that is multidimensional.

nearest coordinate or variable:: The variable that can be reached via the shortest traversal of the file from the referring group following the rules set forth in the <<groups>>.

nearest dimension `dim_name`:: The dimension named `dim_name` in whose scope the referring group lies. The scoping rules of netCDF dictate that the nearest dimension is always in the referring group or an ancestor of it. In cases where all multiple ancestor groups define dimensions name `dim_name`, the nearest dimension `dim_name` is the closest such ancestor to the referring group.

out-of-group reference:: A reference to an element that is not contained in the referring group.
out-of-group reference:: A reference to a variable or dimension that is not contained in the referring group.

recommendation:: Recommendations in this convention are meant to provide advice that may be helpful for reducing common mistakes. In some cases we have recommended rather than required particular attributes in order to maintain backwards compatibility with COARDS. An application must not depend on a dataset's adherence to recommendations.

referring group:: The group in which a reference to an identifier occurs.
referring group:: The group in which a reference to a variable or dimension occurs.

scalar coordinate variable:: A scalar variable (i.e. one with no dimensions) that contains
coordinate data. Depending on context, it may be functionally equivalent either to a size-one
Expand Down
16 changes: 8 additions & 8 deletions ch02.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -184,27 +184,27 @@ These strategies are explained in detail in the following sections.

===== Search by absolute path

An identifier specified with an absolute path (i.e., with a leading slash "/") resolves to the indicated location.
An variable or dimension specified with an absolute path (i.e., with a leading slash "/") is at the indicated location.
For example, a `coordinates` attribute of `/g1/lat` refers to the `lat` variable in group `/g1`.
The dataset producer must ensure that dimension(s) utilized by out-of-group variables are the same as those used by the referring variable.
For example, the dimension `lat` underlying variables in the current (referring) group must be the same as the dimension `lat` nearest in scope to the out-of-group coordinates for those variables.
Thus a variable `/g2/temperature` with `coordinates` attribute containing `/g1/lat` is permissible so long as there is no other `lat` dimension defined "in between" those locations, e.g., `/lat`.

===== Search by relative path

An identifier specified with a relative path (i.e., with an internal but no leading slash "/") resolves to the indicated location.
An variable or dimension specified with a relative path (i.e., with an internal but no leading slash "/") is at the location obtained by affixing the relative path to the absolute path of the referring attribute.
For example, a `coordinates` attribute of `g1/lat` refers to the `lat` variable in subgroup `g1` of the current (referring) group.
Upward path traversals from the current group are indicated with the UNIX convention.
For example, `../g1/lat` refers to the `lat` variable in the sibling group `g1` of the current (referring) group.

===== Search by proximity

An identifier specified with no path resolves to the most proximal identifier of the same name.
In all cases, if the named object is present in the referring group, that object is the most proximal.
A variable or dimension specified with no path is the nearest variable or dimension of the same name.
In all cases, if the named variable or dimension is present in the referring group, that object is the nearest.
For example, a `coordinates` attribute of `lat` refers to the `lat` variable (if any) in the present group.
If the object is not in the referring group then the identifier is termed an out-of-group reference.
If the variable or dimension is not in the referring group then it is termed an out-of-group reference.

Out-of-group references are resolved by searching all direct ancestors until the specified identifier is found.
Out-of-group references are resolved by searching all direct ancestors until the specified variable or dimension is found.

[NOTE]
====
Expand All @@ -214,8 +214,8 @@ This placement of coordinates and lateral search strategy to find them are disco

A special case exists for coordinate variables.
Because coordinate variables must share dimensions with the variables that reference them, the ancestor search is executed only until the local apex group is reached.
If the identifier in question cannot be found within the local apex group or any of the intermediate groups between it and the referring group, a lateral (width-wise) search is initiated from the local apex group.
The lateral search proceeds downwards from the local apex group through each level of groups until the sought identifier is found.
If the coordinate in question cannot be found within the local apex group or any of the intermediate groups between it and the referring group, a lateral (width-wise) search is initiated from the local apex group.
The lateral search proceeds downwards from the local apex group through each level of groups until the sought coordinate is found.

==== Application of attributes

Expand Down

0 comments on commit 751de50

Please sign in to comment.