66class DomainTopology (mixin .PropertiesData , cfdm .DomainTopology ):
77 """A domain topology construct of the CF data model.
88
9- TODOUGRID
10-
11- A cell measure construct provides information that is needed about
12- the size or shape of the cells and that depends on a subset of the
13- domain axis constructs. Cell measure constructs have to be used
14- when the size or shape of the cells cannot be deduced from the
15- dimension or auxiliary coordinate constructs without special
16- knowledge that a generic application cannot be expected to have.
17-
18- The cell measure construct consists of a numeric array of the
19- metric data which spans a subset of the domain axis constructs,
20- and properties to describe the data. The cell measure construct
21- specifies a "measure" to indicate which metric of the space it
22- supplies, e.g. cell horizontal areas, and must have a units
23- property consistent with the measure, e.g. square metres. It is
24- assumed that the metric does not depend on axes of the domain
25- which are not spanned by the array, along which the values are
26- implicitly propagated. CF-netCDF cell measure variables correspond
27- to cell measure constructs.
9+ A domain topology construct defines the geospatial topology of
10+ cells arranged in two or three dimensions in real space but
11+ indexed by a single (discrete) domain axis construct, and at most
12+ one domain topology construct may be associated with any such
13+ domain axis. The topology describes topological relationships
14+ between the cells - spatial relationships which do not depend on
15+ the cell locations - and is represented by an undirected graph,
16+ i.e. a mesh in which pairs of nodes are connected by links. Each
17+ node has a unique arbitrary identity that is independent of its
18+ spatial location, and different nodes may be spatially co-located.
19+
20+ The topology may only describe cells that have a common spatial
21+ dimensionality, one of:
22+
23+ * Point: A point is zero-dimensional and has no boundary vertices.
24+ * Edge: An edge is one-dimensional and corresponds to a line
25+ connecting two boundary vertices.
26+ * Face: A face is two-dimensional and corresponds to a surface
27+ enclosed by a set of edges.
28+
29+ Each type of cell implies a restricted topology for which only
30+ some kinds of mesh are allowed. For point cells, every node
31+ corresponds to exactly one cell; and two cells have a topological
32+ relationship if and only if their nodes are connected by a mesh
33+ link. For edge and face cells, every node corresponds to a
34+ boundary vertex of a cell; the same node can represent vertices in
35+ multiple cells; every link in the mesh connects two cell boundary
36+ vertices; and two cells have a topological relationship if and
37+ only if they share at least one node.
38+
39+ A domain topology construct contains an array defining the mesh,
40+ and properties to describe it. There must be a property indicating
41+ the spatial dimensionality of the cells. The array values comprise
42+ the node identities, and all array elements that refer to the same
43+ node must contain the same value, which must differ from any other
44+ value in the array. The array spans the domain axis construct and
45+ also has a ragged dimension, whose function depends on the spatial
46+ dimensionality of the cells.
47+
48+ For point cells, the array's ragged dimension values are composed
49+ of the node identity of each cell in the first element, followed
50+ in arbitrary order by the identity of each node to which it is
51+ connected by a mesh link.
52+
53+ For edge and face cells, the array's ragged dimension values are
54+ the node identities of the boundary vertices of each cell, in the
55+ same order that the boundary vertices are stored by the auxiliary
56+ coordinate constructs. Each boundary vertex except the last is
57+ connected by a mesh link to the next vertex along the ragged
58+ dimension, and the last vertex is connected to the first.
59+
60+ When a domain topology construct is present it is considered to be
61+ definitive and must be used in preference to the topology implied
62+ by inspection of any other constructs, which is not guaranteed to
63+ be the same.
64+
65+ In CF-netCDF a domain topology construct can only be provided for
66+ a UGRID mesh topology variable. The information in the construct
67+ array is supplied by the UGRID "edge_nodes_connectivity" variable
68+ (for edge cells) or "face_nodes_connectivity" variable (for face
69+ cells). The topology for node cells may be provided by any of
70+ these three UGRID variables. The integer indices contained in the
71+ UGRID variable may be used as the mesh node identities, although
72+ the CF data model attaches no significance to the values other
73+ than the fact that some values are the same as others. The spatial
74+ dimensionality property is provided by the "location" attribute of
75+ a variable that references the UGRID mesh topology variable,
76+ i.e. a data variable or a UGRID location index set variable.
77+
78+ See CF Appendix I "The CF Data Model".
2879
2980 **NetCDF interface**
3081
31- {{netCDF variable}}
82+ The netCDF variable name of the UGRID mesh topology variable may
83+ be accessed with the `nc_set_variable`, `nc_get_variable`,
84+ `nc_del_variable`, and `nc_has_variable` methods.
3285
33- .. versionadded:: TODOUGRIDVER
86+ .. versionadded:: UGRIDVER
3487
3588 """
3689
@@ -44,15 +97,19 @@ def __repr__(self):
4497
4598 @property
4699 def cell (self ):
47- """TODOUGRID Measure which indicates the metric of space supplied .
100+ """The cell type .
48101
49- .. versionadded:: TODOUGRIDVER
102+ {{cell type}}
103+
104+ .. versionadded:: UGRIDVER
105+
106+ .. seealso:: `del_cell`, `get_cell`, `has_cell`, `set_cell`
50107
51108 """
52109 return self .get_cell (default = AttributeError ())
53110
54111 @cell .setter
55- def cell (self , value ):
112+ def cell (self , value ):
56113 self .set_cell (value )
57114
58115 @cell .deleter
@@ -78,7 +135,7 @@ def identity(
78135 * The netCDF variable name, preceded by ``'ncvar%'``.
79136 * The value of the *default* parameter.
80137
81- .. versionadded:: TODOUGRIDVER
138+ .. versionadded:: UGRIDVER
82139
83140 .. seealso:: `id`, `identities`, `long_name`, `cell`,
84141 `nc_get_variable`, `standard_name`
0 commit comments