cfgrib icon indicating copy to clipboard operation
cfgrib copied to clipboard

gribapi.errors.WrongLengthError: Wrong message length

Open morestart opened this issue 3 years ago • 10 comments

this is my code, what's wrong?

import xarray as xr

dss = xr.open_dataset('/home/jp/Desktop/C1D01010000010109001', engine='cfgrib',
                      backend_kwargs={'filter_by_keys': {'shortName': '2t'}})
print()

morestart avatar May 24 '22 09:05 morestart

Is /home/jp/Desktop/C1D01010000010109001 a file or a folder ? If a folder this is wrong.

ChristopheLRTE avatar May 25 '22 12:05 ChristopheLRTE

Is /home/jp/Desktop/C1D01010000010109001 a file or a folder ? If a folder this is wrong.

It's a grib file.

morestart avatar May 25 '22 12:05 morestart

How can I get it in order to test it please ? (if not a big one you can attach it to a post)

ChristopheLRTE avatar May 25 '22 12:05 ChristopheLRTE

链接: https://pan.baidu.com/s/1ubKIHbFhIyLDyNifHk5pIw?pwd=ogrs 提取码: ogrs you can get it from baidu disk

or google drive: https://drive.google.com/file/d/1KeFFgUFWdTRBTmA3_TabhAa2bYfwICWi/view?usp=sharing

morestart avatar May 25 '22 12:05 morestart

Where did you obtain this file ?

ChristopheLRTE avatar May 25 '22 12:05 ChristopheLRTE

Where did you obtain this file ?

emmm, sorry, i can't tell you

morestart avatar May 25 '22 12:05 morestart

This is a corrupted grib file, or just not a grib file

ChristopheLRTE avatar May 25 '22 12:05 ChristopheLRTE

2bf9c3419f853f79b15264f1c3a4557 my friends can open this file, but i can't reproduction this

morestart avatar May 25 '22 12:05 morestart

Can your friend do a :

  • If windows 10 : certutil -hashfile C1D01010000010109001 SHA256
  • If linux : sha256sum C1D01010000010109001

You too and compare the results please ?

ChristopheLRTE avatar May 25 '22 12:05 ChristopheLRTE

i know your means, i will try this

morestart avatar May 25 '22 12:05 morestart