subroutine yT_periodic use modglobal, only : jb, je, jh, jhc use modfields, only : thl0, thlm, thl0c use modmpi, only:excjs, myid, nprocs integer m do m = 1, jh thl0(:, jb - m, :) = thl0(:, je + 1 - m, :) thl0(:, je + m, :) = thl0(:, jb - 1 + m, :) thlm(:, jb - m, :) = thlm(:, je + 1 - m, :) thlm(:, je + m, :) = thlm(:, jb - 1 + m, :) end do do m = 1, jhc thl0c(:, jb - m, :) = thl0c(:, je + 1 - m, :) thl0c(:, je + m, :) = thl0c(:, jb - 1 + m, :) end do return end subroutine yT_periodic