|
53 | 53 | from .grid import Grid, GridType, _calc_cell_areas |
54 | 54 |
|
55 | 55 | if TYPE_CHECKING: |
56 | | - from ctypes import _Pointer as PointerType |
57 | | - |
58 | 56 | from parcels.fieldset import FieldSet |
59 | 57 |
|
60 | 58 | __all__ = ["Field", "NestedField", "VectorField"] |
@@ -343,7 +341,6 @@ def __init__( |
343 | 341 | # since some datasets do not provide the deeper level of data (which is ignored by the interpolation). |
344 | 342 | self.data_full_zdim = kwargs.pop("data_full_zdim", None) |
345 | 343 | 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 |
347 | 344 | self.nchunks: tuple[int, ...] = () |
348 | 345 | self._chunk_set: bool = False |
349 | 346 | self.filebuffers = [None] * 2 |
@@ -1120,7 +1117,6 @@ def _chunk_setup(self): |
1120 | 1117 | return |
1121 | 1118 |
|
1122 | 1119 | self._data_chunks = [None] * npartitions |
1123 | | - self._c_data_chunks = [None] * npartitions |
1124 | 1120 | self.grid._load_chunk = np.zeros(npartitions, dtype=c_int, order="C") |
1125 | 1121 | # self.grid.chunk_info format: number of dimensions (without tdim); number of chunks per dimensions; |
1126 | 1122 | # 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): |
1150 | 1146 | self._data_chunks[block_id] = None |
1151 | 1147 | else: |
1152 | 1148 | self._data_chunks[block_id, :] = None |
1153 | | - self._c_data_chunks[block_id] = None |
1154 | 1149 | else: |
1155 | 1150 | if isinstance(self._data_chunks, list): |
1156 | 1151 | self._data_chunks[0] = None |
1157 | 1152 | else: |
1158 | 1153 | self._data_chunks[0, :] = None |
1159 | | - self._c_data_chunks[0] = None |
1160 | 1154 | self.grid._load_chunk[0] = g._chunk_loaded_touched |
1161 | 1155 | self._data_chunks[0] = np.array(self.data, order="C") |
1162 | 1156 |
|
|
0 commit comments