pure subroutine ice_mass_update_x_impl(iareaT, uh, mca, dt_adv, nghost, nx_phys, ncat, nx, ny)
!! SIS2 `:183-191`: `mca(c) -= dt_adv*iareaT*(uh(I)-uh(I-1))`,
!! physical cells only. No race (reads faces, writes cells).
integer, intent(in) :: nghost, nx_phys, ncat, nx, ny
real(wp), intent(in) :: iareaT(nx, ny)
real(wp), intent(in) :: uh(nx + 1, ny, ncat)
real(wp), intent(inout) :: mca(nx, ny, ncat)
real(wp), intent(in) :: dt_adv
integer :: i, j, c, i_lo, i_hi
i_lo = nghost + 1
i_hi = nghost + nx_phys
do concurrent(j=1:ny, i=i_lo:i_hi, c=1:ncat)
mca(i, j, c) = mca(i, j, c) - dt_adv*iareaT(i, j)*(uh(i + 1, j, c) - uh(i, j, c))
end do
end subroutine ice_mass_update_x_impl