Index: trunk/src/gridcheck.f90
===================================================================
--- trunk/src/gridcheck.f90	(revision 27)
+++ trunk/src/gridcheck.f90	(revision 20)
@@ -84,8 +84,8 @@
   real(kind=4) :: xaux1,xaux2,yaux1,yaux2
   real(kind=8) :: xaux1in,xaux2in,yaux1in,yaux2in
-  integer :: gribVer,parCat,parNum,typSurf,valSurf,discipl,parID
+  integer :: gribVer,parCat,parNum,typSurf,valSurf,discipl
   !HSO  end
   integer :: ix,jy,i,ifn,ifield,j,k,iumax,iwmax,numskip
-  real :: sizesouth,sizenorth,xauxa,pint,conversion_factor
+  real :: sizesouth,sizenorth,xauxa,pint
 
   ! VARIABLES AND ARRAYS NEEDED FOR GRIB DECODING
@@ -98,5 +98,6 @@
 
   integer :: isec1(56),isec2(22+nxmax+nymax)
-  real(kind=4) :: zsec2(60+2*nuvzmax),zsec4(jpunp)
+  !real(kind=4) :: zsec2(60+2*nuvzmax),zsec4(jpunp)
+  real(kind=4) :: zsec2(184),zsec4(jpunp)
   character(len=1) :: opt
 
@@ -171,6 +172,4 @@
   call grib_check(iret,gribFunction,gribErrorMsg)
   call grib_get_int(igrib,'level',valSurf,iret)
-  call grib_check(iret,gribFunction,gribErrorMsg)
-  call grib_get_int(igrib,'paramId',parId,iret)
   call grib_check(iret,gribFunction,gribErrorMsg)
 
@@ -194,6 +193,4 @@
   elseif ((parCat.eq.2).and.(parNum.eq.32)) then ! W, actually eta dot
     isec1(6)=135         ! indicatorOfParameter
-  elseif ((parCat.eq.128).and.(parNum.eq.77)) then ! W, actually eta dot
-    isec1(6)=135         ! indicatorOfParameter
   elseif ((parCat.eq.3).and.(parNum.eq.0).and.(typSurf.eq.101)) then !SLP
     isec1(6)=151         ! indicatorOfParameter
@@ -208,7 +205,7 @@
   elseif ((parCat.eq.1).and.(parNum.eq.11).and.(typSurf.eq.1)) then ! SD
     isec1(6)=141         ! indicatorOfParameter
-  elseif ((parCat.eq.6).and.(parNum.eq.1) .or. parId .eq. 164) then ! CC
+  elseif ((parCat.eq.6).and.(parNum.eq.1)) then ! CC
     isec1(6)=164         ! indicatorOfParameter
-  elseif ((parCat.eq.1).and.(parNum.eq.9) .or. parId .eq. 142) then ! LSP
+  elseif ((parCat.eq.1).and.(parNum.eq.9)) then ! LSP
     isec1(6)=142         ! indicatorOfParameter
   elseif ((parCat.eq.1).and.(parNum.eq.10)) then ! CP
@@ -218,11 +215,11 @@
   elseif ((parCat.eq.4).and.(parNum.eq.9).and.(typSurf.eq.1)) then ! SR
     isec1(6)=176         ! indicatorOfParameter
-  elseif ((parCat.eq.2).and.(parNum.eq.17) .or. parId .eq. 180) then ! EWSS
+  elseif ((parCat.eq.2).and.(parNum.eq.17)) then ! EWSS
     isec1(6)=180         ! indicatorOfParameter
-  elseif ((parCat.eq.2).and.(parNum.eq.18) .or. parId .eq. 181) then ! NSSS
+  elseif ((parCat.eq.2).and.(parNum.eq.18)) then ! NSSS
     isec1(6)=181         ! indicatorOfParameter
   elseif ((parCat.eq.3).and.(parNum.eq.4)) then ! ORO
     isec1(6)=129         ! indicatorOfParameter
-  elseif ((parCat.eq.3).and.(parNum.eq.7) .or. parId .eq. 160) then ! SDO
+  elseif ((parCat.eq.3).and.(parNum.eq.7)) then ! SDO
     isec1(6)=160         ! indicatorOfParameter
   elseif ((discipl.eq.2).and.(parCat.eq.0).and.(parNum.eq.0).and. &
@@ -233,8 +230,4 @@
          parCat,parNum,typSurf
   endif
-  if(parId .ne. isec1(6) .and. parId .ne. 77) then
-    write(*,*) 'parId',parId, 'isec1(6)',isec1(6)
-!    stop
-  endif
 
   endif
@@ -272,5 +265,5 @@
 
   !HSO  get the second part of the grid dimensions only from GRiB1 messages
-  if (isec1(6) .eq. 167 .and. (gotGrid.eq.0)) then
+  if ((gribVer.eq.1).and.(gotGrid.eq.0)) then
     call grib_get_real8(igrib,'longitudeOfLastGridPointInDegrees', &
          xaux2in,iret)
@@ -298,4 +291,5 @@
     dyconst=180./(dy*r_earth*pi)
     gotGrid=1
+
   ! Check whether fields are global
   ! If they contain the poles, specify polar stereographic map
@@ -443,11 +437,13 @@
   !********************
 
-  write(*,'(a,2i7)') ' Vertical levels in ECMWF data: ', &
+  write(*,*)
+  write(*,*)
+  write(*,'(a,2i7)') '# of vertical levels in ECMWF data: ', &
        nuvz+1,nwz
   write(*,*)
-  write(*,'(a)') ' Mother domain:'
-  write(*,'(a,f10.5,a,f10.5,a,f10.5)') '  Longitude range: ', &
+  write(*,'(a)') 'Mother domain:'
+  write(*,'(a,f10.2,a1,f10.2,a,f10.2)') '  Longitude range: ', &
        xlon0,' to ',xlon0+(nx-1)*dx,'   Grid distance: ',dx
-  write(*,'(a,f10.5,a,f10.5,a,f10.5)') '  Latitude range : ', &
+  write(*,'(a,f10.2,a1,f10.2,a,f10.2)') '  Latitude range: ', &
        ylat0,' to ',ylat0+(ny-1)*dy,'   Grid distance: ',dy
   write(*,*)
@@ -471,5 +467,4 @@
     k=nlev_ec+1+numskip+i
     akm(nwz-i+1)=zsec2(j)
-  !   write (*,*) 'ifield:',ifield,k,j,zsec2(10+j)
     bkm(nwz-i+1)=zsec2(k)
   end do
@@ -558,3 +553,2 @@
 
 end subroutine gridcheck
-
