Skip to content

Commit

Permalink
force more xarray attributes to be strings
Browse files Browse the repository at this point in the history
  • Loading branch information
blaylockbk authored Aug 30, 2024
1 parent 0117471 commit 2d5e1b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions herbie/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,12 +1159,12 @@ def xarray(
# Add some details
# ----------------
# Note: all attributes should still work with the `ds.to_netcdf()` method.
ds.attrs["model"] = self.model
ds.attrs["product"] = self.product
ds.attrs["model"] = str(self.model)
ds.attrs["product"] = str(self.product)
ds.attrs["description"] = self.DESCRIPTION
ds.attrs["remote_grib"] = self.grib
ds.attrs["remote_grib"] = str(self.grib)
ds.attrs["local_grib"] = str(local_file)
ds.attrs["search"] = search
ds.attrs["search"] = str(search)

# ----------------------
# Attach CF grid mapping
Expand Down

0 comments on commit 2d5e1b7

Please sign in to comment.