Skip to content

Commit ca772d6

Browse files
Merge pull request #930 from OceanParcels/removing_unused_depth_index_method
Removing unused depth_index() method from field.py
2 parents 9104864 + 6a296f5 commit ca772d6

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

parcels/field.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,18 +1018,6 @@ def time_index(self, time):
10181018
else:
10191019
return (time_index.argmin() - 1 if time_index.any() else 0, 0)
10201020

1021-
def depth_index(self, depth, lat, lon):
1022-
"""Find the index in the depth array associated with a given depth"""
1023-
if depth > self.grid.depth[-1]:
1024-
raise FieldOutOfBoundError(lon, lat, depth, field=self)
1025-
depth_index = self.grid.depth <= depth
1026-
if depth_index.all():
1027-
# If given depth == largest field depth, use the second-last
1028-
# field depth (as zidx+1 needed in interpolation)
1029-
return len(self.grid.depth) - 2
1030-
else:
1031-
return depth_index.argmin() - 1 if depth_index.any() else 0
1032-
10331021
def eval(self, time, z, y, x, applyConversion=True):
10341022
"""Interpolate field values in space and time.
10351023

0 commit comments

Comments
 (0)