c
c
c***********************************************************************
c
      subroutine ARRAYD (ba,nrr,ncc,lvv)
c
c-----------------------------------------------------------------------
c
c   program authors  l. feldman and j dunphey formerly
c   with computing sciences division, union carbide,
c   nuclear division, oak ridge
c
c
c  arrayd is an output subroutine which prints a
c  single precision matrix.  the calling sequence 
c  is
c      call ARRAYD (a,nr,nc,id)
c  where
c   a      is a single precision array to be
c          listed.
c   nr     is the integer number of rows of the
c          matrix a desired in the output.
c   nc     is the integer number of columns of the
c          matrix a desired in the output.
c   id     is the integer first dimension of a in 
c          the calling program, i.e. a(id,*) or a(id)
c
      character*8 column
      dimension ba(1)
      logical ip
      common /blokip/ ip
      data column /'column  '/
c
      do 1801 ml=1,ncc,4
         mh=ml+3
         if (ncc.ge.mh) go to 1760
         mh=ncc
1760     mlm1=(ml-1)*lvv
         mhm1=(mh-1)*lvv
         do 1801 li=1,nrr,40
            nl=li
            nh=nl+49
            if (nrr.ge.nh) go to 1770
            nh=nrr
1770        print 1780, (column,j,j=ml,mh)
            if (ip) write (10,1780) (column,j,j=ml,mh)
1780        format (/' '/' row',6x,4(a6,i5,4x)/)
            do 1790 l=nl,nh
               mml=mlm1+l
               mmh=mhm1+l
               print 1800, l,(ba(j),j=mml,mmh,lvv)
1790           if (ip) write (10,1800) l,(ba(j),j=mml,mmh,lvv)
1800        format (' ',i3,3x,1p4e15.6) 
c
 1801 continue
c
      return
c
      end 
