diff --git a/flopy/utils/rasters.py b/flopy/utils/rasters.py index 4fabf0482..39697f97c 100644 --- a/flopy/utils/rasters.py +++ b/flopy/utils/rasters.py @@ -537,13 +537,6 @@ def resample_to_grid( arr = self.get_array(band, masked=True) arr = arr.flatten() - # filter out nan values from the original dataset - if np.isnan(np.sum(arr)): - idx = np.isfinite(arr) - rxc = rxc[idx] - ryc = ryc[idx] - arr = arr[idx] - # step 3: use griddata interpolation to snap to grid data = griddata( (rxc, ryc), @@ -574,7 +567,7 @@ def resample_to_grid( else: raise TypeError(f"{method} method not supported") - if extrapolate_edges and method != "nearest": + if extrapolate_edges: xc = modelgrid.xcellcenters yc = modelgrid.ycellcenters