xcube-dev / xcube-sh

An xcube plugin to allow generating data cubes from the Sentinel Hub Cloud API
MIT License
13 stars 10 forks source link

Do not use monthly or yearly time delta #68

Open TonioF opened 3 years ago

TonioF commented 3 years ago

xcube-sh has parameters 'time_period' and 'time_tolerance' that are noth internally converted to a pandas timedelta object. In case of monthly or yearly values, the following warning is given:

FutureWarning: Units 'M', 'Y' and 'y' do not represent unambiguous timedelta values and will be removed in a future version

This means that xcube-sh in its current form will not be able to work with future versions of pandas. A solution could be to handle the internal representation of the time delta differently.

forman commented 1 year ago

Another workaround is to not use ambiguous units 'M', 'Y' and 'y', but use D or W instead. A parameter validation could prevent from using ambiguous units.