subroutine xsi_profile use modglobal, only : ib, ie, jb, je, kb, ke, nsv, ihc use modfields, only : sv0, svm, svprof integer j, k, n, m do j = jb, je do k = kb, ke + 1 do n = 1, nsv do m = 1, ihc sv0(ib - m, j, k, n) = 2*svprof(k, n) - sv0(ib - m + 1, j, k, n) svm(ib - m, j, k, n) = 2*svprof(k, n) - svm(ib - m + 1, j, k, n) end do end do end do end do end subroutine xsi_profile