From 05bd3a055b5e0e9987bf36fd033cba88fcf6f242 Mon Sep 17 00:00:00 2001 From: David Ahijevych Date: Fri, 26 Jul 2024 19:12:43 -0600 Subject: [PATCH] Pass coords to new UxDataArray in remap functions (#867) Just like #818 did for subset functions. --- uxarray/remap/inverse_distance_weighted.py | 1 + uxarray/remap/nearest_neighbor.py | 1 + 2 files changed, 2 insertions(+) diff --git a/uxarray/remap/inverse_distance_weighted.py b/uxarray/remap/inverse_distance_weighted.py index d70fc9631..219ed0fb2 100644 --- a/uxarray/remap/inverse_distance_weighted.py +++ b/uxarray/remap/inverse_distance_weighted.py @@ -230,6 +230,7 @@ def _inverse_distance_weighted_remap_uxda( uxda_remap = uxarray.core.dataarray.UxDataArray( data=destination_data, name=source_uxda.name, + coords=source_uxda.coords, dims=destination_dims, uxgrid=destination_grid, ) diff --git a/uxarray/remap/nearest_neighbor.py b/uxarray/remap/nearest_neighbor.py index e7c261507..744f974a3 100644 --- a/uxarray/remap/nearest_neighbor.py +++ b/uxarray/remap/nearest_neighbor.py @@ -198,6 +198,7 @@ def _nearest_neighbor_uxda( uxda_remap = uxarray.core.dataarray.UxDataArray( data=destination_data, name=source_uxda.name, + coords=source_uxda.coords, dims=destination_dims, uxgrid=destination_grid, )