      subroutine gribst(ierr,outf)   !DRAGAN-removed gsst, SST is got from monthly SST archive 1981(Dec)-2011(July)

      integer,intent(out)::ierr
      REAL,intent(out)::outf(722,360,356)
integer::i,j,l
!===========================================================================
!============SST DAILY UPDATE(TAKEN FROM CPTEC's REGIONAL ETA MODEL)========      !DRAGAN
!===========================================================================

  
!                                        =================================
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!SST UPDATE, DATA PERIOD 1981-2011!!!!!!!!!!!!!!!!       
!                                        =================================       
      
      open(33,file='/scratchin/grupos/grpeta/projetos/tempo/oper/gef_v1.0.0/gef_trunk/PRP/data_in/init/sst0.5x0.5.dat', &
              access='direct',form='unformatted',recl=4*722*360*356)   !DRAGAN
      read(33,rec=1) outf
      close(33)  

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!      
      do i=1,722
      do j=1,360
      do l=1,356
     
     
      if(j.eq.1)then
      outf(i,j,l)=outf(i,j+1,l)
      endif
      
      if(j.eq.360)then
      outf(i,j,l)=outf(i,j-1,l)
      endif
      
     
     
     
      if(outf(i,j,l).eq.9.9990003E+20.or.outf(i,j,l).ge.350)then
!       print*,'OUTF>350',outf(i,j,l), i,j,l
      endif
      
      enddo
      enddo
      enddo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     
     
      write(0,*) outf(1,1,1)
      write(0,*) outf(100,100,100)
      write(0,*) 'leaving GRIBST'

      ierr = 0
!***************************  
      return
      END
