Skip to content

Commit 040cf0e

Browse files
committed
netcdf_filearry -> scipynetcdffilearray
1 parent a0da5a3 commit 040cf0e

5 files changed

Lines changed: 16 additions & 7 deletions

File tree

cf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@
153153
H5netcdfArray,
154154
NetCDFArray,
155155
NetCDF4Array,
156-
Netcdf_fileArray,
157156
PyfiveArray,
158157
PointTopologyArray,
159158
RaggedContiguousArray,
160159
RaggedIndexedArray,
161160
RaggedIndexedContiguousArray,
161+
ScipyNetcdfFileArray,
162162
SubsampledArray,
163163
UMArray,
164164
ZarrArray,

cf/cfimplementation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
GatheredArray,
3535
H5netcdfArray,
3636
NetCDF4Array,
37-
Netcdf_fileArray,
3837
PointTopologyArray,
3938
PyfiveArray,
4039
RaggedContiguousArray,
4140
RaggedIndexedArray,
4241
RaggedIndexedContiguousArray,
42+
ScipyNetcdfFileArray,
4343
SubsampledArray,
4444
ZarrArray,
4545
)
@@ -149,7 +149,7 @@ def set_construct(self, parent, construct, axes=None, copy=True, **kwargs):
149149
GatheredArray=GatheredArray,
150150
H5netcdfArray=H5netcdfArray,
151151
NetCDF4Array=NetCDF4Array,
152-
Netcdf_fileArray=Netcdf_fileArray,
152+
ScipyNetcdfFileArray=ScipyNetcdfFileArray,
153153
PointTopologyArray=PointTopologyArray,
154154
PyfiveArray=PyfiveArray,
155155
Quantization=Quantization,
@@ -208,7 +208,7 @@ def implementation():
208208
'GatheredArray': cf.data.array.gatheredarray.GatheredArray,
209209
'H5netcdfArray': cf.data.array.h5netcdfarray.H5netcdfArray,
210210
'NetCDF4Array': cf.data.array.netcdf4array.NetCDF4Array,
211-
'Netcdf_fileArray': cf.data.array.netcdf_filearray.Netcdf_fileArray,
211+
'ScipyNetcdfFileArray': cf.data.array.scipynetcdffilearray.ScipyNetcdfFileArray,
212212
'PointTopologyArray': <class 'cf.data.array.pointtopologyarray.PointTopologyArray'>,
213213
'PyfiveArray': cf.data.array.pyfivearray.PyfiveArray,
214214
'Quantization': cf.quantization.Quantization,

cf/data/array/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from .h5netcdfarray import H5netcdfArray
77
from .netcdfarray import NetCDFArray
88
from .netcdf4array import NetCDF4Array
9-
from .netcdf_filearray import Netcdf_fileArray
9+
from .scipynetcdffilearray import ScipyNetcdfFileArray
1010
from .pointtopologyarray import PointTopologyArray
1111
from .pyfivearray import PyfiveArray
1212
from .raggedcontiguousarray import RaggedContiguousArray
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from ...mixin_container import Container
44

55

6-
class Netcdf_fileArray(
6+
class ScipyNetcdfFileArray(
77
Container,
8-
cfdm.Netcdf_fileArray,
8+
cfdm.ScipyNetcdfFileArray,
99
):
1010
"""A netCDF-3 array accessed with `scipy.io.netcdf_file`.
1111

cf/test/test_read_write.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,15 @@ def test_read_zarr(self):
956956
z = cf.read(zarr_dataset, dataset_type="Zarr")
957957
self.assertEqual(len(z), 1)
958958

959+
def test_read_netcdf_file(self):
960+
"""Test cf.read for differing the netcdf_file backend."""
961+
f = self.f0
962+
963+
cf.write(f, tmpfile, fmt="NETCDF3_CLASSIC")
964+
g = cf.read(tmpfile, netcdf_backend="netcdf_file")[0]
965+
966+
self.assertTrue(g.equals(f))
967+
959968

960969
if __name__ == "__main__":
961970
print("Run date:", datetime.datetime.now())

0 commit comments

Comments
 (0)