Improve CF Conformance: 8.3 Lossy Compression by Coordinate Subsampling
jamesdoyle21 opened this issue · 1 comments
8.3 Lossy Compression by Coordinate Subsampling
Requirements:
-
When attached to a data variable, the type of the tie_points attribute is a string whose value is a list of blank separated word groups of the following form, in which brackets indicate optional text: tie_point_variable: [tie_point_variable: …] interpolation_variable. Each tie_point_variable token specifies a tie point variable that must exist in the file, and each interpolation_variable token specifies a variable that must exist in the file.
-
An interpolation variable must have one of the string-valued attributes interpolation_name or interpolation_description, but not both. The legal values for the interpolation_name attribute are contained in the Interpolation Methods section of Appendix J.
-
An interpolation variable must have the attribute computational_precision. The legal values for the computational_precision attribute are contained in the Interpolation Method Implementation subsection of the Lossy Compression by Coordinate Subsampling section of chapter 8.
-
An interpolation variable must have a tie_point_dimensions attribute that is a string whose value is a list of blank separated word groups of the following form, in which brackets indicate optional text: interpolation_dimension: tie_point_interpolation_dimension [interpolation_zone_dimension]. Each interpolation_dimension token specifies a unique interpolation dimension of the parent data variable, each tie_point_interpolation_dimension token specifies the tie point interpolation dimension of a unique tie point index variable, and each interpolation_zone_dimension token specifies a unique interpolation zone dimension. The tie point interpolation dimensions and interpolation zone dimensions must not be dimensions of the parent data variable.
-
The tie point variables associated with each interpolation_variable token must all span the same dimensions, which comprise a subset of zero or more dimensions of the parent data variable with the addition of all of the tie point interpolation dimensions identified by the tie_point_dimensions attribute of the interpolation variable. A tie point variable must not span both a tie point interpolation dimension and its corresponding interpolation dimension, as defined by the tie_point_dimensions mapping.
-
An interpolation variable must have a tie_point_indices attribute that is a string whose value is a list of blank separated word pairs of the following form: interpolation_dimension: tie_point_index_variable. The interpolation_dimension tokens specify the same interpolation dimensions as the tie_point_dimensions attribute, and each tie_point_index_variable token specifies a tie point index variable that must exist in the file.
-
A tie point index variable must be a one-dimensional variable with an integer data type.
-
The dimension of a tie point index variable must be a tie point interpolation dimension identified by the tie_point_dimensions attribute.
-
The values of a tie point index variable must be non-negative integers. The first value must be zero, and each subsequent value must be greater than or equal to the previous value. If a value differs by zero or one from its previous value, then it must differ by two or more from its subsequent value.
-
The size of an interpolation zone dimension must be equal to the size of the corresponding tie point interpolation dimension minus the number of interpolation areas for that tie point interpolation dimension. The number of interpolation areas is equal one plus the number of occurences of adjacent values differing by zero or one in the corresponding tie point index variable.
-
When attached to an interpolation variable, the type of the interpolation_parameters attribute is a string whose value is list of blank separated word pairs in the form term: var. For each valid interpolation_name, the legal values for term are described by the "Interpolation Parameter terms" table entry in the Interpolation Methods section of Appendix J. The values of var must be interpolation parameter variables that exist in the file.
-
The dimensions of an interpolation parameter variable must be a subset of zero or more of the dimensions of the corresponding tie point variables, with the exception that a tie point interpolation dimension may be replaced with its corresponding interpolation zone dimension, as defined by the tie_point_dimensions mapping.
-
If a tie point variable has bounds_tie_points attribute then it must be a string whose value is a single variable name. The specified variable must exist in the file.
-
A bounds tie point variable must have the same dimensions as its associated tie points coordinate variable.
-
A bounds tie point variable must be a numeric data type.
-
A bounds tie point variable must not have the _FillValue or missing_value attributes. The requirements on all other bounds tie point variable attributes are the same as for bounds variables described in 7.1 Cell Boundaries.
Recommendations:
-
An interpolation variable should have 0 dimensions.
-
The recommendations on bounds tie point variable attributes are the same as for bounds variables described in 7.1 Cell Boundaries.
Not yet implemented as part of CF 1.9 checker. This section is very complicated, so it'd be good to have some example (meta)data.