Skip to content

Commit

Permalink
fix minor error in grid_to_xarary
Browse files Browse the repository at this point in the history
  • Loading branch information
syedhamidali committed Oct 20, 2023
1 parent 116a31c commit 2f73ad0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyart/core/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ def to_xarray(self):

time = np.array(
[num2date(self.time["data"][0], units=self.time["units"])],
dtype="datetime64[ns]",
)

ds = xarray.Dataset()
Expand Down Expand Up @@ -424,12 +423,13 @@ def to_xarray(self):
ds.radar_time.attrs.pop("calendar")

if self.radar_name is not None:
radar_name = self.radar_name["data"][0]
radar_name = self.radar_name["data"]
ds["radar_name"] = xarray.DataArray(
np.array([b"".join(radar_name)], dtype="S4"),
np.array([b"".join(radar_name)]),
dims=("nradar"),
attrs=get_metadata("radar_name"),
)

ds.attrs = self.metadata
ds.close()
return ds
Expand Down

0 comments on commit 2f73ad0

Please sign in to comment.