subroutine xmi_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 j, k do j = jb - 1, je + 1 do k = kb, ke + 1 u0(ib, j, k) = uprof(k) um(ib, j, k) = uprof(k) u0(ib - 1, j, k) = 2*u0(ib, j, k) - u0(ib + 1, j, k) ! (u(ib+1)+u(ib-1))/2 = u(ib) um(ib - 1, j, k) = 2*um(ib, j, k) - um(ib + 1, j, k) ! (u(ib+1)+u(ib-1))/2 = u(ib) v0(ib - 1, j, k) = 2*vprof(k) - v0(ib, j, k) ! (v(ib)+v(ib-1))/2 = vprof vm(ib - 1, j, k) = 2*vprof(k) - vm(ib, j, k) ! (v(ib)+v(ib-1))/2 = vprof w0(ib - 1, j, k) = -w0(ib, j, k) wm(ib - 1, j, k) = -wm(ib, j, k) end do end do if (loneeqn) then do j = jb - 1, je + 1 do k = kb, ke + 1 e120(ib - 1, j, k) = 2*e12prof(k) - e120(ib, j, k) ! (e12(ib)+e12(ib-1))/2=e12prof e12m(ib - 1, j, k) = 2*e12prof(k) - e12m(ib, j, k) ! (e12(ib)+e12(ib-1))/2=e12prof end do end do end if end subroutine xmi_profile