From 54915f717474e1322875ac3b6e22efc02ca66861 Mon Sep 17 00:00:00 2001 From: saschahofmann Date: Thu, 3 Oct 2024 16:57:23 +0200 Subject: [PATCH] Floor time to day --- xclim/indices/helpers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/xclim/indices/helpers.py b/xclim/indices/helpers.py index f4943d97b..7ee230330 100644 --- a/xclim/indices/helpers.py +++ b/xclim/indices/helpers.py @@ -670,6 +670,7 @@ def make_hourly_temperature(tasmin: xr.DataArray, tasmax: xr.DataArray) -> xr.Da Hourly temperature. """ data = xr.merge([tasmin, tasmax]) + data = data.assign_coords(time=data.time.dt.floor("D")) # We add one more timestamp so the resample function includes the last day data = xr.concat( [