pure subroutine fill_v_centre_impl(v_face, buf)
! assumed-shape-ok: diag fill — fires once per output frame (cadence-bounded);
! face-sized v_face(:,:,:) has ny+1 second dim, incompatible with cell-sized buf.
real(wp), intent(in) :: v_face(:, :, :)
real(wp), intent(inout) :: buf(:, :, :) ! assumed-shape-ok: diag fill — cadence-bounded
integer :: i, j, k, nx, ny, nz
nx = min(size(buf, 1), size(v_face, 1))
ny = min(size(buf, 2), size(v_face, 2) - 1)
nz = min(size(buf, 3), size(v_face, 3))
do concurrent(k=1:nz, j=1:ny, i=1:nx)
buf(i, j, k) = 0.5_wp*(v_face(i, j, k) + v_face(i, j + 1, k))
end do
end subroutine fill_v_centre_impl