      program get
      include 'grib_api_f77.h' ! behivjuk a grib apit
      integer ifile, iret, igrib, i
      real*8 eszak, nyugat, del, kelet
      real*8 jDirectionIncrement
      real*8 iDirectionIncrement
      integer*4 xracspontok, yracspontok
      integer*4 adatszam
 
      ifile=10
      iret=grib_open_file(ifile,'ecm.grib','r')
      call grib_check(iret)
      call grib_check( grib_new_from_file(ifile,igrib) )
 
C     x iranyu racspontok szama
      call grib_check(grib_get_int(igrib,'numberOfPointsAlongAParallel'
     X,xracspontok) )
      write(*,*) 'X irany=', xracspontok
      call grib_check( grib_get_int(igrib,'numberOfPointsAlongAMeridian'
     X,yracspontok) )
      write(*,*) 'Y irany=', yracspontok
 
C     a szelek koordinatai
      call grib_check( grib_get_real8(igrib
     X,'latitudeOfFirstGridPointInDegrees',eszak) )
       write(*,*) 'eszak=',eszak
      call grib_check( grib_get_real8(igrib
     X,'latitudeOfLastGridPointInDegrees',del) )
       write(*,*) 'del=',del
      call grib_check( grib_get_real8(igrib
     X,'longitudeOfFirstGridPointInDegrees',nyugat) )
       write(*,*) 'nyugat=',nyugat
      call grib_check( grib_get_real8(igrib
     X,'longitudeOfLastGridPointInDegrees',kelet) )
      write(*,*) 'kelet=',kelet

C     terbeli felbontas kellene hogy legyen
      call grib_check( grib_get_real8(igrib
     X,'jDirectionIncrementInDegrees',jDirectionIncrement) )
      write(*,*) 'jDirectionIncrement=',jDirectionIncrement
 
      call grib_check( grib_get_real8(igrib
     X,'iDirectionIncrementInDegrees',iDirectionIncrement) )
      write(*,*) 'iDirectionIncrement=',iDirectionIncrement
 
      call grib_check(grib_get_size(igrib,'values',adatszam))
      write(*,*) 'adatszam=',adatszam ! hany adat van
 
      call grib_check(grib_release(igrib))
      call grib_check(grib_close_file(ifile))
      stop
      end