ecmwf / cfgrib

A Python interface to map GRIB files to the NetCDF Common Data Model following the CF Convention using ecCodes
Apache License 2.0
407 stars 77 forks source link

gribapi.errors.WrongLengthError: Wrong message length #300

Open morestart opened 2 years ago

morestart commented 2 years ago

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()
ChristopheLRTE commented 2 years ago

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

morestart commented 2 years ago

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

It's a grib file.

ChristopheLRTE commented 2 years ago

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

morestart commented 2 years ago

链接: 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

ChristopheLRTE commented 2 years ago

Where did you obtain this file ?

morestart commented 2 years ago

Where did you obtain this file ?

emmm, sorry, i can't tell you

ChristopheLRTE commented 2 years ago

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

morestart commented 2 years ago

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

ChristopheLRTE commented 2 years ago

Can your friend do a :

You too and compare the results please ?

morestart commented 2 years ago

i know your means, i will try this