From db4b45f378bd669597d7322e86833a30c5d5f751 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Tue, 7 Sep 2021 15:26:27 -0500 Subject: [PATCH] snapshot... --- modules/util/lon_lat_grid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/util/lon_lat_grid.py b/modules/util/lon_lat_grid.py index 9b910a0a..1b4e65fa 100644 --- a/modules/util/lon_lat_grid.py +++ b/modules/util/lon_lat_grid.py @@ -21,7 +21,7 @@ class LonLatGrid: # Incoming longitude must be in range: 0 - 360 degrees # Can have NaN for off Earth grid points (these are handled internally). # closeness_threshold: if < distance of located_point to target, return off grid - def __init__(self, grd_lons, grd_lats, closeness_threshold=5000, reduce=1, leaf_size=40): + def __init__(self, grd_lons, grd_lats, closeness_threshold=2000, reduce=1, leaf_size=40): if grd_lons.shape != grd_lats.shape: raise MyGenericException('incoming lons,lats must have same shape') @@ -52,7 +52,7 @@ class LonLatGrid: points = np.stack([flons, flats], axis=1) self.kd = BallTree(np.deg2rad(points), leaf_size=leaf_size, metric='haversine') - self.closeness_threshold = closeness_threshold + self.closeness_threshold = closeness_threshold * reduce self.reduce = reduce # locate nearest neighbor for incoming target in earth coordinates (Should not have NaNs) -- GitLab