Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a convention for boundary variables for grids whose cells do not all have the same number of sides #521

Merged
merged 8 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ch01.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,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 most rapidly varying one, and its size is the maximum number of cell vertices.
JonathanGregory marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -356,6 +356,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}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.
* {issues}511[Issue #511]: Appendix B: New element in XML file header to record the "first published date"
Expand Down
Loading