Herbie
Herbie copied to clipboard
File Not Downloaded but No Error Raised by Herbie
Herbie does not raise an error when attempting to download a file, when the file is not downloaded successfully. The function download() gives the impression that the data is downloaded, but the file is missing from tha path.
from herbie import Herbie
import os
H = Herbie("2020-08-10", model='hrrr', product='prs', fxx=0)
download_path = H.download('TMP:1000mb')
# check path
if os.path.exists(download_path):
print(f"file found in {download_path}")
else:
print(f"No file in {download_path}")
I get this ✅ Found ┊ model=hrrr ┊ product=prs ┊ 2020-Aug-10 00:00 UTC F00 ┊ GRIB2 @ local ┊ IDX @ aws
No file in /Users/bhupendra/data/hrrr/20200810/subset_58efb1fe__hrrr.t00z.wrfprsf00.grib2
Also tried with xarray ds = H.xarray('TMP:1000mb')
and got the FileNotFoundError: [Errno 2] No such file or directory: '/Users/bhupendra/data/hrrr/20200810/subset_58efb1fe__hrrr.t00z.wrfprsf00.grib2'
Herbie should raise an error or warning if a file is not downloaded. The download() method should return none
as download_path.