Repository: climate
Updated Branches:
  refs/heads/master d98d172f5 -> 90b1b9ffe


CLIMATE-894 - Debugging regrid_spatial_mask

- ocw.utils.regrid_spatial_mask has been debugged.


Project: http://git-wip-us.apache.org/repos/asf/climate/repo
Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/21fe4ead
Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/21fe4ead
Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/21fe4ead

Branch: refs/heads/master
Commit: 21fe4ead660bbdec0d9f176d72ac14f8e94500ec
Parents: 7187cf3
Author: huikyole <huiky...@argo.jpl.nasa.gov>
Authored: Mon Jan 9 21:02:08 2017 -0800
Committer: huikyole <huiky...@argo.jpl.nasa.gov>
Committed: Mon Jan 9 21:02:08 2017 -0800

----------------------------------------------------------------------
 ocw/utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/climate/blob/21fe4ead/ocw/utils.py
----------------------------------------------------------------------
diff --git a/ocw/utils.py b/ocw/utils.py
index 6f8da77..abd793c 100755
--- a/ocw/utils.py
+++ b/ocw/utils.py
@@ -557,7 +557,7 @@ def regrid_spatial_mask(target_lon, target_lat, mask_lon, 
mask_lat, mask_var,
     target_lons, target_lats = convert_lat_lon_2d_array(target_lon, target_lat)
     mask_lons, mask_lats = convert_lat_lon_2d_array(mask_lon, mask_lat)
 
-    if target_lons != mask_lons or target_lats != mask_lats:
+    if target_lons.all() != mask_lons.all() or target_lats.all() != 
mask_lats.all():
         mask_var_regridded = interpolate.griddata((mask_lons.flatten(), 
mask_lats.flatten()),
                                                   mask_var.flatten(),
                                                   (target_lons.flatten(),

Reply via email to