From c0b2f13acdaa45fd6ebc7ea7d4b1b8078de222bb Mon Sep 17 00:00:00 2001
From: tomrink <rink@ssec.wisc.edu>
Date: Sat, 13 Aug 2022 09:58:22 -0500
Subject: [PATCH] add new method...

---
 modules/util/util.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/util/util.py b/modules/util/util.py
index e696b079..1c6ed66e 100644
--- a/modules/util/util.py
+++ b/modules/util/util.py
@@ -1331,4 +1331,8 @@ def downscale_2x(original, smoothing=False, samples_axis_first=False):
 
 
 def resample(x, y, z, x_min, x_max, y_min, y_max):
-    return RectBivariateSpline(x, y, z, [x_min, x_max, y_min, y_max])
+    z_intrp = []
+    for k in range(z.shape[0]):
+        z_k = z[k, :, :]
+        z_intrp.append(RectBivariateSpline(x, y, z_k, [x_min, x_max, y_min, y_max]))
+    return np.stack(z_intrp)
-- 
GitLab