Skip to content

Commit 3c75589

Browse files
committed
Remove Field._c_data_chunks
1 parent aa440df commit 3c75589

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

parcels/field.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@
5353
from .grid import Grid, GridType, _calc_cell_areas
5454

5555
if TYPE_CHECKING:
56-
from ctypes import _Pointer as PointerType
57-
5856
from parcels.fieldset import FieldSet
5957

6058
__all__ = ["Field", "NestedField", "VectorField"]
@@ -343,7 +341,6 @@ def __init__(
343341
# since some datasets do not provide the deeper level of data (which is ignored by the interpolation).
344342
self.data_full_zdim = kwargs.pop("data_full_zdim", None)
345343
self._data_chunks = [] # type: ignore # the data buffer of the FileBuffer raw loaded data - shall be a list of C-contiguous arrays
346-
self._c_data_chunks: list[PointerType | None] = [] # C-pointers to the data_chunks array
347344
self.nchunks: tuple[int, ...] = ()
348345
self._chunk_set: bool = False
349346
self.filebuffers = [None] * 2
@@ -1120,7 +1117,6 @@ def _chunk_setup(self):
11201117
return
11211118

11221119
self._data_chunks = [None] * npartitions
1123-
self._c_data_chunks = [None] * npartitions
11241120
self.grid._load_chunk = np.zeros(npartitions, dtype=c_int, order="C")
11251121
# self.grid.chunk_info format: number of dimensions (without tdim); number of chunks per dimensions;
11261122
# chunksizes (the 0th dim sizes for all chunk of dim[0], then so on for next dims
@@ -1150,13 +1146,11 @@ def _chunk_data(self):
11501146
self._data_chunks[block_id] = None
11511147
else:
11521148
self._data_chunks[block_id, :] = None
1153-
self._c_data_chunks[block_id] = None
11541149
else:
11551150
if isinstance(self._data_chunks, list):
11561151
self._data_chunks[0] = None
11571152
else:
11581153
self._data_chunks[0, :] = None
1159-
self._c_data_chunks[0] = None
11601154
self.grid._load_chunk[0] = g._chunk_loaded_touched
11611155
self._data_chunks[0] = np.array(self.data, order="C")
11621156

0 commit comments

Comments
 (0)