Skip to content

Commit

Permalink
Fixed bug in retrieve_data.py
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioDioguardi committed Mar 10, 2022
1 parent 1f4d571 commit 4e5f202
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions weather/retrieve_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,15 +594,16 @@ def datespan(startDate, endDate, delta=timedelta(days=1)):
slat_sources.append(slat_source)
ifcst = ifcst + 1
ifcst = 0
try:
pool = ThreadingPool(len(wtfiles))
pool.map(wtfile_download, urls, wtfiles)
except:
print('No new weather data downloaded')
return False
if len(wtfiles) > 0:
try:
pool = ThreadingPool(len(wtfiles))
pool.map(wtfile_download, urls, wtfiles)
except:
print('No new weather data downloaded')
return False
if len(wtfiles) > 0:
pool_1 = ThreadingPool(len(wtfiles))
pool_1.map(elaborate_wtfiles, wtfiles, wtfiles_int, wtfiles_prof, abs_validities, zooms, lon_corners,
lat_corners, slon_sources, slat_sources)

return (True)
return True

0 comments on commit 4e5f202

Please sign in to comment.