%N transd %F $MIR/src/subs/trans.for
%D Transpose double precision matrix
%: transpose, reorder
%P nebk
%B
      subroutine transd (a, m, n, move, iwrk, iok)

      implicit none
      integer m, n, iwrk, move(iwrk), iok
      double precision a(m*n)

     In situ double precision matrix transpose

     From Laflin and Brebner, CACM, Vol 13, No.5, May 1970

  Input
    a    2-D matrix passed in as 1-D
    m,n  matrix dimensions
    move work array
    iwrk Size of move, should be (m+n)/2
  Output
    iok  0 => OK
        -1 => iwrk <= 0
