Skip to content

Commit 672cb98

Browse files
committed
dev
1 parent c3ad04c commit 672cb98

15 files changed

+154
-122
lines changed

cf/auxiliarycoordinate.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ class AuxiliaryCoordinate(
3636
3737
{{netCDF variable}}
3838
39-
The netCDF variable group structure may be accessed with the
40-
`nc_set_variable`, `nc_get_variable`, `nc_variable_groups`,
41-
`nc_clear_variable_groups` and `nc_set_variable_groups` methods.
39+
{{netCDF UGRID node coordinate}}
4240
4341
"""
4442

cf/cellconnectivity.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ class CellConnectivity(mixin.PropertiesData, cfdm.CellConnectivity):
2020
connectivity, and properties to describe the data. There must be a
2121
property indicating the condition by which the connectivity is
2222
derived from the domain topology. The array spans the domain axis
23-
construct with the addition of a ragged dimension that indexes a
24-
unique identity for the cell as well as the identities of all
25-
other cells to which it is connected. The cell identity must be
26-
recorded in the first element of the ragged dimension, otherwise
27-
the order is arbitrary. Note that the connectivity array for point
23+
construct with the addition of a ragged dimension. For each cell,
24+
the first element along the ragged dimension contains the unique
25+
identity of the cell, and the following elements contain in
26+
arbitrary order the identities of all the other cells to which the
27+
cell is connected. Note that the connectivity array for point
2828
cells is, by definition, equivalent to the array of the domain
2929
topology construct.
3030
@@ -38,7 +38,6 @@ class CellConnectivity(mixin.PropertiesData, cfdm.CellConnectivity):
3838
UGRID mesh topology variable. The construct array is supplied
3939
either indirectly by any of the UGRID variables that are used to
4040
define a domain topology construct, or directly by the UGRID
41-
"edge_edge_connectivity" variable (for edge cells) or
4241
"face_face_connectivity" variable (for face cells). In the direct
4342
case, the integer indices contained in the UGRID variable may be
4443
used as the cell identities, although the CF data model attaches

cf/constructs.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ class Constructs(cfdm.Constructs):
4747
* dimension coordinate constructs
4848
* domain ancillary constructs
4949
* domain axis constructs
50+
* domain topology constructs
51+
* cell connectivity constructs
5052
* cell method constructs
5153
* field ancillary constructs
5254
@@ -126,9 +128,6 @@ def _flip(self, axes):
126128
]
127129
construct.flip(iaxes, inplace=True)
128130

129-
# ----------------------------------------------------------------
130-
# Methods
131-
# ----------------------------------------------------------------
132131
def close(self):
133132
"""Close all files referenced by the metadata constructs.
134133

cf/data/array/boundsfromnodesarray.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import cfdm
22

33
from ...mixin_container import Container
4-
from .mixin import ArrayMixin, CompressedArrayMixin, MeshArrayMixin
4+
from .mixin import ArrayMixin, CompressedArrayMixin #, MeshArrayMixin
55

66

77
class BoundsFromNodesArray(
8-
MeshArrayMixin,
8+
# MeshArrayMixin,
99
CompressedArrayMixin,
1010
ArrayMixin,
1111
Container,

cf/data/array/cellconnectivityarray.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import cfdm
22

33
from ...mixin_container import Container
4-
from .mixin import ArrayMixin, CompressedArrayMixin, MeshArrayMixin
4+
from .mixin import ArrayMixin, CompressedArrayMixin #, MeshArrayMixin
55

66

77
class CellConnectivityArray(
8-
MeshArrayMixin,
8+
# MeshArrayMixin,
99
CompressedArrayMixin,
1010
ArrayMixin,
1111
Container,
@@ -14,8 +14,8 @@ class CellConnectivityArray(
1414
"""A connectivity array derived from a UGRID connectivity variable.
1515
1616
A UGRID connectivity variable contains indices which map each cell
17-
to its neighbours, as found in a UGRID "edge_edge_connectivty",
18-
"face_face_connectivty", or "volume_volume_connectivty" variable.
17+
to its neighbours, as found in a UGRID "face_face_connectivty" or
18+
"volume_volume_connectivty" variable.
1919
2020
The connectivity array has one more column than the corresponding
2121
UGRID variable. The extra column, in the first position, contains

cf/data/array/gatheredarray.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ def __repr__(self):
3232
"""
3333
return super().__repr__().replace("<", "<CF ", 1)
3434

35-
def subarray_parameters(self):
36-
"""TODOUGRID"""
37-
return {}
38-
39-
4035
# def to_dask_array(self, chunks="auto"):
4136
# """Convert the data to a `dask` array.
4237
#

cf/data/array/mixin/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
from .arraymixin import ArrayMixin
22
from .compressedarraymixin import CompressedArrayMixin
33
from .filearraymixin import FileArrayMixin
4-
from .mesharraymixin import MeshArrayMixin
5-
6-
# from .raggedarraymixin import RaggedArrayMixin

cf/data/array/mixin/compressedarraymixin.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ def _lock_file_read(self, array):
5050

5151
return array
5252

53-
def subarray_parameters(self):
54-
"""TODOUGRID"""
55-
raise NotImplementedError("TODOUGRID")
56-
5753
def to_dask_array(self, chunks="auto"):
5854
"""Convert the data to a `dask` array.
5955
@@ -92,8 +88,7 @@ def to_dask_array(self, chunks="auto"):
9288

9389
context = partial(config.set, scheduler="synchronous")
9490

95-
compressed_dimensions = self.compressed_dimensions()
96-
conformed_data = self.conformed_data()
91+
# compressed_dimensions = self.compressed_dimensions() TODOUGRID
9792

9893
# If possible, convert the compressed data to a dask array
9994
# that doesn't support concurrent reads. This prevents
@@ -103,12 +98,10 @@ def to_dask_array(self, chunks="auto"):
10398
# TODO: This won't be necessary if this is refactored so that
10499
# the compressed data is part of the same dask graph as
105100
# the compressed subarrays.
101+
conformed_data = self.conformed_data()
106102
conformed_data = {
107103
k: self._lock_file_read(v) for k, v in conformed_data.items()
108104
}
109-
110-
# TODO: When the minimum version is Python 3.9, replace with
111-
# `subarray_kwargs = conformed_data | self.subarray_parameters()`
112105
subarray_kwargs = {**conformed_data, **self.subarray_parameters()}
113106

114107
# Get the (cfdm) subarray class
@@ -129,14 +122,13 @@ def to_dask_array(self, chunks="auto"):
129122
subarray = Subarray(
130123
indices=c_indices,
131124
shape=u_shape,
132-
compressed_dimensions=compressed_dimensions,
125+
# compressed_dimensions=compressed_dimensions, # TODOUGRID
133126
context_manager=context,
134127
**subarray_kwargs,
135128
)
136129

137130
key = f"{subarray_name}-{tokenize(subarray)}"
138131
dsk[key] = subarray
139-
140132
dsk[name + chunk_location] = (getter, key, Ellipsis, False, False)
141133

142134
# Return the dask array

cf/data/array/mixin/mesharraymixin.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
class MeshArrayMixin:
2-
"""Mixin class for data based on a UGRID connectivity array.
3-
4-
.. versionadded:: UGRIDVER
5-
6-
"""
7-
8-
def subarray_parameters(self):
9-
"""TODOUGRID"""
10-
return {"start_index": self.get_start_index()}
11-
12-
1+
#class MeshArrayMixin:
2+
# """Mixin class for data based on a UGRID connectivity array.
3+
#
4+
# .. versionadded:: UGRIDVER
5+
#
6+
# """
7+
#
8+
# def subarray_parameters(self):
9+
# """TODOUGRID"""
10+
# return {"start_index": self.get_start_index()}
11+
#
12+
#
1313
# def to_dask_array(self, chunks="auto"):
1414
# """Convert the data to a `dask` array.
1515
#

cf/data/array/pointtopologyarray.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import cfdm
22

33
from ...mixin_container import Container
4-
from .mixin import ArrayMixin, CompressedArrayMixin, MeshArrayMixin
4+
from .mixin import ArrayMixin, CompressedArrayMixin #, MeshArrayMixin
55

66

77
class PointTopologyArray(
8-
MeshArrayMixin,
8+
# MeshArrayMixin,
99
CompressedArrayMixin,
1010
ArrayMixin,
1111
Container,

0 commit comments

Comments
 (0)