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

grib_api bug: problem identifying "2d" (dewpoint temp)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • GRIB
    • None
    • Member State Met Service

      Hi,

      I encoundered a small bug in grib_api (various versions, including 1.11.0). When changing the "shortName" to "2d" (2m Dewpoint T), the parameter table and number are in fact set to
      3.44 (wind divergence) in stead of 3.17 (dewpoint T).

      The error seems to lie in the file (and maybe others as well)
      definitions/grib1/shortName.def :

      #2 metre dewpoint temperature
      '2d' = {
      	 table2Version = 3 ;
      	 indicatorOfParameter = 44 ;
      	 indicatorOfTypeOfLevel = 105 ;
      	 level = 2 ;
      	}
      

      So while "d" does indeed signify divergence, "2d" should not be identified as divergence at 2m.

      The resulting grib message is inconsistently recognised by grib_api. Output from grib_dump:

      # D Relative divergence s**-1 (grib1/2.0.3.table)  
        indicatorOfParameter = 44;
        # Fixed height above ground height in meters  (2 octets)  (grib1/3.table)  
        indicatorOfTypeOfLevel = 105;
        level = 2;
        # Forecast product valid at reference time + P1  (P1>0)  (grib1/5.table)  
        timeRangeIndicator = 0;
        # Unknown code table entry ()  
        subCentre = 255;
        paramId = 168;
        #-READ ONLY- cfNameECMF = divergence_of_wind;
        #-READ ONLY- cfName = divergence_of_wind;
        #-READ ONLY- units = K;
        #-READ ONLY- nameECMF = 2 metre dewpoint temperature;
        #-READ ONLY- name = 2 metre dewpoint temperature;
      

      kind regards,
      Alex

            usv Daniel Varela Santoalla
            cv6 Alex Deckmyn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: