You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Came across this unusual error I'd never seen before while working with Herbie today. Running the following code:
from herbie import Herbie
H = Herbie(
"2020-06-06 12:00", # model run date
model="hrrr", # model name
product="prs", # model product name (model dependent)
fxx=0, # forecast lead time
)
ds1 = H.xarray(searchString=":(?:TMP|DPT|HGT|UGRD|VGRD):\d+ mb", remove_grib=False)
ds2 = H.xarray(searchString=":(?:HGT|UGRD|VGRD):\d+ mb", remove_grib=False)
Defining ds1 works as expected. But attempting to define ds2 repeatedly generates the following error message, apparently indefinitely until the script is manually terminated:
skipping corrupted Message
Traceback (most recent call last):
File "/home/tsilas/.conda/envs/herbie/lib/python3.9/site-packages/cfgrib/messages.py", line 273, in itervalues
yield self.filestream.message_from_file(file, errors=errors)
File "/home/tsilas/.conda/envs/herbie/lib/python3.9/site-packages/cfgrib/messages.py", line 340, in message_from_file
return Message.from_file(file, offset, **kwargs)
File "/home/tsilas/.conda/envs/herbie/lib/python3.9/site-packages/cfgrib/messages.py", line 96, in from_file
codes_id = eccodes.codes_grib_new_from_file(file)
File "/home/tsilas/.conda/envs/herbie/lib/python3.9/site-packages/gribapi/gribapi.py", line 409, in grib_new_from_file
GRIB_CHECK(err)
File "/home/tsilas/.conda/envs/herbie/lib/python3.9/site-packages/gribapi/gribapi.py", line 226, in GRIB_CHECK
errors.raise_grib_error(errid)
File "/home/tsilas/.conda/envs/herbie/lib/python3.9/site-packages/gribapi/errors.py", line 381, in raise_grib_error
raise ERROR_MAP[errid](errid)
gribapi.errors.WrongLengthError: Wrong message length
It seems odd that getting temp and dewpoint data would be necessary to also get height and wind, but this is the temporary fix that I've found works.
What is stranger is that this error only occurs when running on our server. I have no issues running the script on my personal laptop. Both are running the same version of herbie, but slightly different versions of python (3.9.16 on laptop vs 3.9.18 on server). Does this suggest that the grib files on the server are somehow corrupted, despite both sets of grib files being downloaded the same way via FastHerbie, or is this some other herbie issue?
The text was updated successfully, but these errors were encountered:
The errors are coming from cfgrib, not Herbie. That said, it doesn't mean Herbie isn't at fault. It could be the GRIB2 file is corrupt or is an incomplete download.
Check and see if you can read the GRIB2 file with other grib readers (cfgrib, pygrib, any other tool) and see if that is true. Or, delete the GRIB2 file on disk and try downloading it again.
Came across this unusual error I'd never seen before while working with Herbie today. Running the following code:
Defining ds1 works as expected. But attempting to define ds2 repeatedly generates the following error message, apparently indefinitely until the script is manually terminated:
It seems odd that getting temp and dewpoint data would be necessary to also get height and wind, but this is the temporary fix that I've found works.
What is stranger is that this error only occurs when running on our server. I have no issues running the script on my personal laptop. Both are running the same version of herbie, but slightly different versions of python (3.9.16 on laptop vs 3.9.18 on server). Does this suggest that the grib files on the server are somehow corrupted, despite both sets of grib files being downloaded the same way via FastHerbie, or is this some other herbie issue?
The text was updated successfully, but these errors were encountered: