Skip to content

Commit

Permalink
Floor time to day
Browse files Browse the repository at this point in the history
  • Loading branch information
saschahofmann committed Oct 3, 2024
1 parent 95c1a45 commit 54915f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions xclim/indices/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand Down

0 comments on commit 54915f7

Please sign in to comment.