Solution (source code)

= Solution

Set $v(t,z)=u(t,z+at)$. Then $v_t=\kappa v_{zz}$ and $v(0,z)=u_0(z)$. Applying the heat kernel and returning to $x$ gives the <advection-diffusion heat-kernel solution>
$$
\boxed{
u(t,x)=\int_{-\infty}^{\infty}
K_t(x-at-y)u_0(y)\,dy}.
$$