Skip to content

Commit

Permalink
Fix time units
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Wales committed Jun 24, 2021
1 parent 96c4673 commit 9b6fc86
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions era5grib/era5grib.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def save_grib(ds, output, format="grib"):
"""
Save a dataset to GRIB format
"""

ds.time.encoding['units'] = 'hours since 1970-01-01'

if format == "netcdf":
climtas.io.to_netcdf_throttled(ds, output)
return
Expand Down

0 comments on commit 9b6fc86

Please sign in to comment.