
      parameter(nmax=3000)
      dimension z(nmax)
      character*56 ifile,ofile
      character*64 id
      data dum/0./,nz/1/
      write(*,'(a\)') ' enter input file name: '
      read(*,'(a)') ifile
      write(*,'(a\)') ' enter output file name: '
      read(*,'(a)') ofile
      open(10,file=ifile,status='old')
      open(11,file=ofile,status='unknown',form='unformatted')
      read(10,*) nc,nr,xo,dx,yo,dy
      id = ifile
      write(11) id,nc,nr,nz,xo,dx,yo,dy
      do 20 i = 1,nr
      read(10,*) (z(j),j=1,nc)
      write(11) dum,(z(j),j=1,nc)
20    continue
      stop
      end
