C$$$  sub  PROGRAM DOCUMENTATION BLOCK
C                .      .    .                                       .
C sub  PROGRAM:  gridst   READ GLOBAL Grib SST
C                            
C
C ABSTRACT: SUBSTITUTE THE GRIBST SUB PROGRAM
C           READ THE SST FIELD IN A BINARY FORMAT 
C           INSTED A GRIB FORMAT
C           IN THIS CASE THE BINARY FILE IS GENERATE
C           FROM SST GRIB2 FILE WITH WGRIB2 PROGRAM: 
C           wgrib2 -d 1 sst2dvar_grb_0.5.grib2 -v \
C           -no_header big_endian -bin ssthiresgrd.bin
C
C		SST with 0.25 graus
C PROGRAM HISTORY LOG:
C   08-11-03  JORGE LUIS GOMES
C   28-09-11 MELORY MONIE
C
      subroutine gridst(insst,gsst)
c
      parameter(nx=1440,ny=720,nxp1=nx+1) !mel

      REAl out(nx,ny)
      dimension gsst(nxp1,ny)
c
C
c
C            OPEN UNIT FOR READING GRID FILE
       OPEN (INSST,form='unformatted',convert='big_endian')
       READ(INSST)((out(I,J),I=1,1440),J=1,720) !mel
C
              do  jj= 1,ny
                do  kk= 1,nx
                 gsst(kk,jj) = out(kk,jj)
                end do
              end do
c
c...   add greenich to right side of grid
c
             do jj = 1,ny
               gsst(nxp1,jj) = gsst(1,jj)
             end do
         write(95)gsst
c
C
   30        CONTINUE
C
  999           CONTINUE
	write(6,*) 'leaving GRIDST'
             return
             END
