Skip to content

Commit adfefda

Browse files
Remove the "faces_edges_cartesian" and "faces_edges_spherical" at the end of zonal_avg
1 parent b9e7d12 commit adfefda

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

uxarray/core/dataarray.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -483,13 +483,6 @@ def zonal_mean(self, lat=(-90, 90, 10), **kwargs):
483483
uxda=self, latitudes=latitudes, **kwargs
484484
)
485485

486-
# Remove the "faces_edges_cartesian" and "faces_edges_spherical" since they're no longer needed
487-
if "faces_edges_cartesian" in self._ds:
488-
del self.faces_edges_cartesian
489-
490-
if "faces_edges_spherical" in self._ds:
491-
del self.faces_edges_spherical
492-
493486
dims = list(self.dims[:-1]) + ["latitudes"]
494487

495488
uxda = UxDataArray(

uxarray/core/zonal.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,10 @@ def _compute_non_conservative_zonal_mean(uxda, latitudes, use_robust_weights=Fal
4848
axis=-1
4949
)
5050

51+
# Remove the "faces_edges_cartesian" and "faces_edges_spherical" since they're no longer needed
52+
if "faces_edges_cartesian" in uxgrid._ds:
53+
del uxgrid.faces_edges_cartesian
54+
55+
if "faces_edges_spherical" in uxgrid._ds:
56+
del uxgrid.faces_edges_spherical
5157
return result

0 commit comments

Comments
 (0)