Skip to content

Commit

Permalink
make_hourly_temperature floors time to day (#1939)
Browse files Browse the repository at this point in the history
### What kind of change does this PR introduce?

* `make_hourly_temperature` floors time to day
  • Loading branch information
Zeitsperre authored Oct 3, 2024
2 parents 95c1a45 + 54915f7 commit a66b06c
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 a66b06c

Please sign in to comment.