Skip to content

Commit

Permalink
fix calendar fix temp path
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Nov 19, 2024
1 parent 25945e0 commit 0d64ff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rook/utils/decadal_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def decadal_fix_calendar(ds_id, ds, output_dir=None):
ds.time.encoding["calendar"] = "standard"
# need to write and read file to rewrite time dimension for the standard calendar!
tmp_dir = tempfile.TemporaryDirectory(dir=output_dir)
fixed_nc = os.path.join(tmp_dir, "fixed_calendar.nc")
fixed_nc = os.path.join(tmp_dir.name, "fixed_calendar.nc")
ds.to_netcdf(fixed_nc)
ds = open_xr_dataset(fixed_nc)
tmp_dir.cleanup()
Expand Down

0 comments on commit 0d64ff7

Please sign in to comment.