Uploaded image for project: 'Software Support'
  1. Software Support
  2. SUP-538

About GRIB edition 1 to 2 conversion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • GRIB
    • None
    • Cooperating Organisation

      Dear Sir/Madam,

      I met some problem when I deal with the GRIB1 data and ask you for help.

      I want to extract a geographic subdomain from ECMWF's ensemble prediction products which is encoded in GRIB1, the name of the product likes "C3E06170000061700001", I tried many tools just like "ggrib" etc., but they don't work.

      So I tried with GRIB-API 1.10.4, I want to convert the format from grib1 to grib2, then I can extract the subdomain with "wgrib2",the steps that I use GRIB-API is:

      1. install GRIB-API
      2. copy grib_api-1.10.4/share/grib_api/definitions/grib1/localConcepts/ecmf/cfName.def as well as name.def, paramId.def , shortName.def and units.def to the default definition path "grib_api-1.10.4/share/grib_api/definitions/grib1/", in order to use the ECMWF's definitions.
      3. run "./grib_set -s edition=2 C3E06170000061700001 output.grb2", but it prompts the following errors:
      GRIB_API ERROR : concept: no match for paramId=132
      GRIB_API ERROR : grib_set_values[0] edition (1) failed: Concept no match

      I checked the grib1's ParamId.def file, and found the definitions of '132' are as follows, I'm confused. Which 'def' files should I use? In my opinion, the def files in 'ecmf' should be the newest version, should I definite any parameters by myself?

      I'm not farmiliar with grib format as well as the definition tables, could you please give me some advise on how to use "grib-set" to realize the conversion or directly subdomain extraction?

      1. paramId.def
        #V component of wind
        '132' = { table2Version = 128 ; indicatorOfParameter = 132 ; }

        #V component of wind
        '132' =

        { table2Version = 160 ; indicatorOfParameter = 132 ; }

        #V component of wind
        '132' =

        { table2Version = 170 ; indicatorOfParameter = 132 ; }

        #V component of wind
        '132' =

        { table2Version = 180 ; indicatorOfParameter = 132 ; }

        #V component of wind
        '132' =

        { table2Version = 190 ; indicatorOfParameter = 132 ; }

      Looking forward for you reply! Thank you very much!

      Best Regards,
      Shirley

            usv Daniel Varela Santoalla
            xuelei@cma.gov.cn XUE LEI
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: