Skip to content

Commit 1c3958c

Browse files
Remove old comments/debug statements
1 parent ca6e266 commit 1c3958c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

parcels/spatialhash.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ def query(
147147
num_coords = coords.shape[0]
148148

149149
# Preallocate results
150-
# bcoords = np.zeros((num_coords, 4), dtype=np.double)
151150
faces = np.full((num_coords, 2), -1, dtype=np.int32)
152151

153152
# Get the list of candidate faces for each coordinate
@@ -188,10 +187,9 @@ def query(
188187
err = abs(np.dot(bcoord, nodes[:, 0]) - coord[0]) + abs(np.dot(bcoord, nodes[:, 1]) - coord[1])
189188
if (bcoord >= 0).all() and err < tol:
190189
faces[i, :] = [yi, xi]
191-
# bcoords[i, :] = bcoord
192190
break
193191

194-
return faces # , bcoords
192+
return faces
195193

196194

197195
def _triangle_area(A, B, C):
@@ -243,6 +241,7 @@ def planar_quad_area(lon, lat):
243241
"""Computes the area of each quadrilateral face in a curvilinear grid.
244242
The lon and lat arrays are assumed to be 2D arrays of points with dimensions (n_y, n_x).
245243
The area is computed using the Shoelace formula.
244+
This method is only used during hashgrid construction to determine the size of the hash cells.
246245
247246
Parameters
248247
----------
@@ -276,6 +275,8 @@ def curvilinear_grid_facebounds(lon, lat):
276275
The lon and lat arrays are assumed to be 2D arrays of points with dimensions (n_y, n_x).
277276
The bounds are for faces whose corner node vertices are defined by lon,lat.
278277
Face(yi,xi) is surrounding by points (yi,xi), (yi,xi+1), (yi+1,xi+1), (yi+1,xi).
278+
This method is only used during hashgrid construction to determine which curvilinear
279+
faces overlap with which hash cells.
279280
280281
Parameters
281282
----------

0 commit comments

Comments
 (0)