Closed RondeauG closed 1 year ago
Can we get a MWE of the bug with a traceback ?
~It does not happen on my side.~
EDIT. My bad, the search
method will pass coverage=0
, this the code in the issue is simply not executed. I overlooked that when implementing this!
Setup Information
Description
Since the recent change,
catalog.subset_file_coverage
fails when multiple files are located within the interval, becauseguessed_length
results in multiple values instead of just one:Which gives:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Steps To Reproduce
Search for multiple years of CRCM5 data (which is saved monthly).
Additional context
Applying
sum(guessed_length, datetime.timedelta())
will make the lineguessed_length / period_length < coverage
work as intended.Found by @vindelico
Contribution