Skip to content

Commit

Permalink
Fix earthkit mutably messing up an xarray's longitude (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
juntyr authored Oct 28, 2024
1 parent bbb5961 commit 13c8a80
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/earthkit/plots/sources/xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,7 @@ def crs(self):
def x_values(self):
"""The x values of the data."""
super().x_values
x = self.data[self._x].values
if self.extract_x() in identifiers.LONGITUDE and (max(abs(x)) > 180):
x -= 180
return x
return self.data[self._x].values

@cached_property
def y_values(self):
Expand Down

0 comments on commit 13c8a80

Please sign in to comment.