You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

The following GRIBEX Fortran interface is no longer present in the GRIB API. You will have seen from the GRIB API Fortran 90 interface that the information contained in the GRIB message can be accessed through alphanumeric keys.

In your Fortran code, you will have to explicitly name the keys that you are using. The tables below will help you find the key names corresponding to the "old" GRIB1 header section elements.

These tables include the GRIB API Coded key names and also Recommended GRIB API key names. You should use the latter.

INTEGER
    INTEGER KSEC0(2)
    INTEGER KSEC1(1024)
    INTEGER KSEC2(1024)
    INTEGER KSEC3(2)
    INTEGER KSEC4(512)
    INTEGER KLENP, KLENG, KWORD, KRET
    INTEGER KGRIB(*y)
C
    REAL PSEC2(512)
    REAL PSEC3(2)
    REAL PSEC4(*y)
C
    CHARACTER*1 HOPER
       :
       :
    CALL GRIBEX(KSEC0,KSEC1,KSEC2,PSEC2,KSEC3,PSEC3,KSEC4,
   X            PSEC4,KLENP,KGRIB,KLENG,KWORD,HOPER,KRET)


For more info see: KSEC0, KSEC1, KSEC2, KSEC3, KSEC4, PSEC2,PSEC3, PSEC4

How to migrate from GRIBEX to ecCodes

Find the corresponding ecCodes key names to the elements in the GRIBEX ksec0(*), ..., ksec4(*), psec2(*),...psec4(*) header sections. Use the links shown above

Try to use the "recommended" keys, i.e. keys that are valid for both GRIB-1 and GRIB-2 (for instance "dataDate" instead of "YearOfCentury", "month", "day").
See edition independent keys under: https://apps.ecmwf.int/codes/grib/format/edition-independent/

  • No labels