Skip to content

Commit

Permalink
TemporalAggregate now correctly incorporates time resolution in retri…
Browse files Browse the repository at this point in the history
…eval of timekeys. (#95)
  • Loading branch information
benvanbasten-ns committed Mar 7, 2022
1 parent f7f297f commit 0055ee4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Changelog of dask-geomodeling
2.3.9 (unreleased)
------------------

- Nothing changed yet.
- TemporalAggregate now correctly incorporates time resolution in retrieval of timekeys.


2.3.8 (2022-02-18)
Expand Down
6 changes: 6 additions & 0 deletions dask_geomodeling/raster/temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,12 @@ def get_sources_and_requests(self, **request):
"start": request["start"],
"stop": request["stop"],
}

# In case the data request dictates a temporal resolution,
# also set this in temporal request
if "time_resolution" in request:
time_request["time_resolution"] = request["time_resolution"]

return [(kwargs, None), (self.source, time_request), (self.source, request)]

@staticmethod
Expand Down

0 comments on commit 0055ee4

Please sign in to comment.