subroutine hvisc_apply_impl(u_face, v_face, du_visc, dv_visc, dt, nx, ny, nz, lwait)
integer, intent(in) :: nx, ny, nz
real(wp), intent(inout) :: u_face(nx + 1, ny, nz), v_face(nx, ny + 1, nz)
real(wp), intent(in) :: du_visc(nx + 1, ny, nz), dv_visc(nx, ny + 1, nz)
real(wp), intent(in) :: dt
logical, intent(in) :: lwait
!! .false. ⇒ leave the apply on queue 1 without syncing (batched).
integer :: i, j, k
!$acc kernels async(1)
do concurrent(k=1:nz, j=1:ny, i=1:nx + 1)
u_face(i, j, k) = u_face(i, j, k) + dt*du_visc(i, j, k)
end do
do concurrent(k=1:nz, j=1:ny + 1, i=1:nx)
v_face(i, j, k) = v_face(i, j, k) + dt*dv_visc(i, j, k)
end do
!$acc end kernels
if (lwait) then
!$acc wait(1)
end if
end subroutine hvisc_apply_impl