diff --git a/src/rook/utils/decadal_fixes.py b/src/rook/utils/decadal_fixes.py index 686f325..a5a75b0 100644 --- a/src/rook/utils/decadal_fixes.py +++ b/src/rook/utils/decadal_fixes.py @@ -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()