jswhit / pygrib

Python interface for reading and writing GRIB data
https://jswhit.github.io/pygrib
MIT License
327 stars 97 forks source link

Conversion to Grib1 format not working #120

Open coogor opened 5 years ago

coogor commented 5 years ago

Hi,

I have recently build pygrib for openSUSE https://build.opensuse.org/project/show/home:DocB:Tryton5 and wanted to convert a grib2 file into grib1.

Source-grib: https://openskiron.org/en/cosmo-gribs -> Netherlands

I get a bunch of error messages like ECCODES ERROR : concept: no match for packingType=grid_complex_spatial_differencing ECCODES ERROR : concept: input handle edition=1 Here are the possible values for concept packingType: grid_ccsds grid_ieee grid_jpeg grid_png grid_second_order grid_second_order_SPD1 grid_second_order_SPD2 grid_second_order_SPD3 grid_second_order_boustrophedonic grid_second_order_constant_width grid_second_order_general_grib1 grid_second_order_no_SPD grid_second_order_no_boustrophedonic grid_second_order_row_by_row grid_simple grid_simple_log_preprocessing grid_simple_matrix spectral_complex spectral_ieee spectral_simple cannot convert message 475 140 messages out of 475 converted

and in the end the grib1 file is not accepted as valid (using zyGrib) Can you confirm this error?

jswhit commented 5 years ago

Converting grib2 to grib1 is always hit or miss - it depends on whether the eccodes lib can map the grib2 metadata on to grib1. In this case, it also looks like the eccodes library cannot handle the packing scheme.