The reason it worked during some tests was due to the unordered nature of Python set(), which caused following line to sometimes return the variable name we're trying to obtain instead of expver.
Should, also add a check to make sure that the set difference only returns one element. If there are multiple elements, its a clear sign of an unexpected result.
Description
Using the ERA5 downloader randomly does not update downloaded dataset with latest data.
Relates to latest changes for CDS API migration in Issue: #296, corresponding PR: #298 .
What I Did
Issue crops up when running the daily forecasting with the
icenet-pipeline
scripts for daily forecast generation.Solution
Pinned down issue to a typo in
expver
variable being omitted.https://github.com/icenet-ai/icenet/blob/6f51b305205f9e4c1d697f32a00ea2dac9789bf7/icenet/data/interfaces/cds.py#L142
It was omitting
expvar
instead ofexpver
.The reason it worked during some tests was due to the unordered nature of Python
set()
, which caused following line to sometimes return the variable name we're trying to obtain instead ofexpver
.https://github.com/icenet-ai/icenet/blob/6f51b305205f9e4c1d697f32a00ea2dac9789bf7/icenet/data/interfaces/cds.py#L144
Should, also add a check to make sure that the set difference only returns one element. If there are multiple elements, its a clear sign of an unexpected result.