subroutine ymi_profile use modglobal, only : ib, ie, jb, je, kb, ke use modfields, only : u0, um, v0, vm, w0, wm, e120, e12m, uprof, vprof, e12prof use modsubgriddata, only : loneeqn integer i, k do i = ib - 1, ie + 1 do k = kb, ke + 1 v0(i, jb, k) = vprof(k) vm(i, jb, k) = vprof(k) v0(i, jb - 1, k) = 2*v0(i, jb, k) - v0(i, jb + 1, k) vm(i, jb - 1, k) = 2*vm(i, jb, k) - vm(i, jb + 1, k) u0(i, jb - 1, k) = 2*uprof(k) - u0(i, jb, k) um(i, jb - 1, k) = 2*uprof(k) - um(i, jb, k) w0(i, jb - 1, k) = -w0(i, jb, k) wm(i, jb - 1, k) = -wm(i, jb, k) end do end do if (loneeqn) then do i = ib - 1, ie + 1 do k = kb, ke + 1 e120(i, jb - 1, k) = 2*e12prof(k) - e120(i, jb - 1, k) e12m(i, jb - 1, k) = 2*e12prof(k) - e12m(i, jb - 1, k) end do end do end if end subroutine ymi_profile