************************************************************************ * Randall R. Correll * Mijan F. Huq * Scott A. Klasky * Richard A. Matzner * * COPYRIGHT 1995-1996 * This program swaps the values in arrays A and B using a temporary * array. ************************************************************************ subroutine swap(nx,ny,nz,a,b,temp) implicit none integer nx, ny, nz integer i, j, k real*8 a(nx,ny,nz), b(nx,ny,nz), temp(nx,ny,nz) do i = 1, nx do j = 1, ny do k = 1, nz temp(i,j,k) = a(i,j,k) a(i,j,k) = b(i,j,k) b(i,j,k) = temp(i,j,k) end do end do end do return end