      subroutine grow(mode,iunit,irow,z[huge],ncol,ierr)
      entry growf4(mode,iunit,irow,z[huge],ncol,ierr)
c
c  read or write the next row of a binary grid
c
c  mode:        'r' or 'w'
c  iunit:       fortran unit number
c  irow:        dummy row number
c  z:           real array containing the data for the row
c  ncol:        number of columns
c  ierr:        returns 0 on no error
c
      character*1 mode
      dimension z(ncol)
      data dlt/0.0/
c
      ierr=1
      if(mode.eq.'r'.or.mode.eq.'R') then
        read(iunit,err=20,iostat=ierr) dlt,z
c        irow=dlt
        ierr=0
      else if(mode.eq.'w'.or.mode.eq.'W') then
        dlt=irow
        write(iunit,err=20,iostat=ierr) dlt,z
        ierr=0
      else
        ierr=1
      endif
   20 return
      end
