26
26
TiePointIndex ,
27
27
)
28
28
from .data import Data
29
+
30
+ # REVIEW: h5: `cfimplementation.py`: import `CFAH5netcdfArray`, `CFANetCDF4Array`, `H5netcdfArray`,`NetCDF4Array`
29
31
from .data .array import (
30
32
BoundsFromNodesArray ,
31
33
CellConnectivityArray ,
32
- CFANetCDFArray ,
34
+ CFAH5netcdfArray ,
35
+ CFANetCDF4Array ,
33
36
GatheredArray ,
34
- NetCDFArray ,
37
+ H5netcdfArray ,
38
+ NetCDF4Array ,
35
39
PointTopologyArray ,
36
40
RaggedContiguousArray ,
37
41
RaggedIndexedArray ,
@@ -112,65 +116,41 @@ def set_construct(self, parent, construct, axes=None, copy=True, **kwargs):
112
116
parent , construct , axes = axes , copy = copy , ** kwargs
113
117
)
114
118
115
- def initialise_CFANetCDFArray (
116
- self ,
117
- filename = None ,
118
- address = None ,
119
- dtype = None ,
120
- mask = True ,
121
- units = False ,
122
- calendar = False ,
123
- instructions = None ,
124
- substitutions = None ,
125
- term = None ,
126
- x = None ,
127
- ** kwargs ,
128
- ):
129
- """Return a `CFANetCDFArray` instance.
119
+ # REVIEW: h5: `initialise_CFANetCDF4Array`: new method to initialise `CFANetCDF4Array`
120
+ def initialise_CFANetCDF4Array (self , ** kwargs ):
121
+ """Return a `CFANetCDF4Array` instance.
130
122
131
123
:Parameters:
132
124
133
- filename: `str`
134
-
135
- address: (sequence of) `str` or `int`
136
-
137
- dytpe: `numpy.dtype`
138
-
139
- mask: `bool`, optional
125
+ kwargs: optional
126
+ Initialisation parameters to pass to the new instance.
140
127
141
- units: `str` or `None`, optional
128
+ :Returns:
142
129
143
- calendar: `str` or `None`, optional
130
+ `CFANetCDF4Array`
144
131
145
- instructions: `str`, optional
132
+ """
133
+ cls = self .get_class ("CFANetCDF4Array" )
134
+ return cls (** kwargs )
146
135
147
- substitutions: `dict`, optional
136
+ # REVIEW: h5: `initialise_CFAH5netcdfArray`: new method to initialise `CFAH5netcdfArray`
137
+ def initialise_CFAH5netcdfArray (self , ** kwargs ):
138
+ """Return a `CFAH5netcdfArray` instance.
148
139
149
- term: `str`, optional
140
+ .. versionadded:: NEXTVERSION
150
141
151
- x: `dict`, optional
142
+ :Parameters:
152
143
153
144
kwargs: optional
154
- Ignored .
145
+ Initialisation parameters to pass to the new instance .
155
146
156
147
:Returns:
157
148
158
- `CFANetCDFArray `
149
+ `CFAH5netcdfArray `
159
150
160
151
"""
161
- cls = self .get_class ("CFANetCDFArray" )
162
- return cls (
163
- filename = filename ,
164
- address = address ,
165
- dtype = dtype ,
166
- mask = mask ,
167
- units = units ,
168
- calendar = calendar ,
169
- instructions = instructions ,
170
- substitutions = substitutions ,
171
- term = term ,
172
- x = x ,
173
- )
152
+ cls = self .get_class ("CFAH5netcdfArray" )
153
+ return cls (** kwargs )
174
154
175
155
176
156
_implementation = CFImplementation (
@@ -179,7 +159,8 @@ def initialise_CFANetCDFArray(
179
159
CellConnectivity = CellConnectivity ,
180
160
CellMeasure = CellMeasure ,
181
161
CellMethod = CellMethod ,
182
- CFANetCDFArray = CFANetCDFArray ,
162
+ CFAH5netcdfArray = CFAH5netcdfArray ,
163
+ CFANetCDF4Array = CFANetCDF4Array ,
183
164
CoordinateReference = CoordinateReference ,
184
165
DimensionCoordinate = DimensionCoordinate ,
185
166
Domain = Domain ,
@@ -202,7 +183,8 @@ def initialise_CFANetCDFArray(
202
183
BoundsFromNodesArray = BoundsFromNodesArray ,
203
184
CellConnectivityArray = CellConnectivityArray ,
204
185
GatheredArray = GatheredArray ,
205
- NetCDFArray = NetCDFArray ,
186
+ H5netcdfArray = H5netcdfArray ,
187
+ NetCDF4Array = NetCDF4Array ,
206
188
PointTopologyArray = PointTopologyArray ,
207
189
RaggedContiguousArray = RaggedContiguousArray ,
208
190
RaggedIndexedArray = RaggedIndexedArray ,
@@ -236,7 +218,8 @@ def implementation():
236
218
'CellConnectivityArray': cf.data.array.cellconnectivityarray.CellConnectivityArray,
237
219
'CellMeasure': cf.cellmeasure.CellMeasure,
238
220
'CellMethod': cf.cellmethod.CellMethod,
239
- 'CFANetCDFArray': cf.data.array.cfanetcdfarray.CFANetCDFArray,
221
+ 'CFAH5netcdfArray': cf.data.array.cfah5netcdfarray.CFAH5netcdfArray,
222
+ 'CFANetCDF4Array': cf.data.array.cfanetcdf4array.CFANetCDF4Array,
240
223
'CoordinateReference': cf.coordinatereference.CoordinateReference,
241
224
'DimensionCoordinate': cf.dimensioncoordinate.DimensionCoordinate,
242
225
'Domain': cf.domain.Domain,
@@ -257,7 +240,8 @@ def implementation():
257
240
'PartNodeCountProperties': cf.partnodecountproperties.PartNodeCountProperties,
258
241
'Data': cf.data.data.Data,
259
242
'GatheredArray': cf.data.array.gatheredarray.GatheredArray,
260
- 'NetCDFArray': cf.data.array.netcdfarray.NetCDFArray,
243
+ 'H5netcdfArray': cf.data.array.h5netcdfarray.H5netcdfArray,
244
+ 'NetCDF4Array': cf.data.array.netcdf4array.NetCDF4Array,
261
245
'PointTopologyArray': <class 'cf.data.array.pointtopologyarray.PointTopologyArray'>,
262
246
'RaggedContiguousArray': cf.data.array.raggedcontiguousarray.RaggedContiguousArray,
263
247
'RaggedIndexedArray': cf.data.array.raggedindexedarray.RaggedIndexedArray,
0 commit comments