c=======================================================================
c purpose: for array xx of size nz, return xx in reverse order


      subroutine reverse(nz,xx) 5
      dimension xx(*)
      do 10 i=1,nz/2
        ir=nz-i+1
        x=xx(i)
        xx(i)=xx(ir)
        xx(ir)=x
 10   continue
      return
      end