Skip to content

Commit

Permalink
Remove Timestamp unit (-) when loading as xarray
Browse files Browse the repository at this point in the history
  • Loading branch information
smithara committed Mar 28, 2021
1 parent c23ec03 commit 9b63ff1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions viresclient/_data_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ def as_xarray_dataset(self, reshape=False):
ds[var].attrs["description"] = self.get_variable_description(var)
except KeyError:
ds[var].attrs["description"] = FRAME_DESCRIPTIONS.get(var, "")
# Remove unused Timestamp unit (-)
# for xarray 0.17 compatibility when writing to netcdf
ds["Timestamp"].attrs.pop("units", None)
return ds

@staticmethod
Expand Down

0 comments on commit 9b63ff1

Please sign in to comment.