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