Skip to content

Commit

Permalink
Merge pull request cf-convention#521 from JonathanGregory/issue163
Browse files Browse the repository at this point in the history
Provide a convention for boundary variables for grids whose cells do not all have the same number of sides
  • Loading branch information
JonathanGregory authored Aug 1, 2024
2 parents cf40f6e + 9fe4d0a commit 4b92ba5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ch01.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ There is no relationship between the name of a tie point variable and the name(s

time dimension:: A dimension of a netCDF variable that has an associated time coordinate variable.

vertex dimension:: The dimension of a boundary variable along which the vertices of each cell are ordered.

vertical dimension:: A dimension of a netCDF variable that has an associated vertical coordinate variable.

=== Overview
Expand Down
7 changes: 6 additions & 1 deletion ch07.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ For cases when data pertain to geospatial features with highly variable geometry
To represent cells we add the attribute **`bounds`** to the appropriate coordinate variable(s).
The value of **`bounds`** is the name of the variable that contains the vertices of the cell boundaries.
We refer to this type of variable as a "boundary variable."
__A boundary variable will have one more dimension than its associated coordinate or auxiliary coordinate variable.__ The additional dimension should be the most rapidly varying one, and its size is the maximum number of cell vertices.
__A boundary variable must have one more dimension than its associated coordinate or auxiliary coordinate variable.__
We refer to the additional dimension as the "vertex dimension".
The vertex dimension must be the last dimension in CDL order (the most rapidly varying dimension), and its size is the maximum number of cell vertices.
The vertex dimension must be of size two if the associated variable is one-dimensional, and of size greater than two if the associated variable has more than one dimension.
For grids constructed from cells that do not all have the same number of sides (e.g., a grid with some rectangular cells and some triangular cells), the vertex dimension must be at least as large as the maximum number of cell vertices.
For cells with fewer vertices than the size of vertex dimension, the unneeded elements must appear as the last elements in the vertex dimension and must be assigned the **`_FillValue`**.

A boundary variable inherits the values of some attributes from its parent coordinate variable.
If a coordinate variable has any of the attributes marked "BI" (for "inherit") in the "Use" column of <<attribute-appendix>>, they are assumed to apply to its bounds variable as well.
Expand Down
2 changes: 2 additions & 0 deletions conformance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ If there are two dimensions, the leading dimension (CDL order) must match one of
* The type of the **`bounds`** attribute is a string whose value is a single variable name.
The specified variable must exist in the file.
* A boundary variable must have the same dimensions as its associated variable, plus have a trailing dimension (CDL order) for the maximum number of vertices in a cell.
The trailing dimension must be of size two if the associated variable is one-dimensional, and of size greater than two if the associated variable has more than one dimension.
* Any elements of the boundary variable which contain the **`FillValue`** must form a consecutive block at the end of the trailing dimension.
* A boundary variable must be a numeric data type.
* A boundary variable can only have inheritable attributes, i.e. any of those marked "BI" in the "Use" column of http://cfconventions.org/cf-conventions/cf-conventions.html#attribute-appendix[Appendix A], if they are also present on its parent coordinate variable.
* If a boundary variable has an inheritable attribute then its data type and its value must be exactly the same as the parent variable's attribute.
Expand Down
1 change: 1 addition & 0 deletions history.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

=== Working version (most recent first)

* {issues}163[Issue #163]: Provide a convention for boundary variables for grids whose cells do not all have the same number of sides.
* {issues}174[Issue #174]: A one-dimensional string-valued variable must not have the same name as its dimension, in order to avoid its being mistaken for a coordinate variable.
* {issues}237[Issue #237]: Clarify that the character set given in section 2.3 for variable, dimension, attribute and group names is a recommendation, not a requirement.
* {issues}515[Issue #515]: Clarify the recommendation to use the convention of 4.3.3 for parametric vertical coordinates, because the previous wording caused confusion.
Expand Down

0 comments on commit 4b92ba5

Please sign in to comment.