Solution (source code)

= Solution

The <Möbius transformation>
$$
w=i\frac{1-z}{1+z}
$$
maps the <unit disc> conformally onto the upper half-plane. On the upper semicircle of its boundary, $w$ approaches the positive real axis; on the lower semicircle it approaches the negative real axis. If $0<\arg w<\pi$, the harmonic function
$$
\phi(w)=\phi_0\left(1-\frac{2\arg w}{\pi}\right)
$$
has the required boundary limits.

For $z=x+iy$,
$$
w=\frac{2y+i(1-x^2-y^2)}{(1+x)^2+y^2}.
$$
Since the imaginary part is positive inside the disc,
$$
\frac\pi2-\arg w
=\arctan\frac{\operatorname{Re}w}{\operatorname{Im}w}
=\arctan\frac{2y}{1-x^2-y^2}.
$$
Therefore the solution of the <Dirichlet problem> is
$$
\boxed{\phi(x,y)=\frac{2\phi_0}{\pi}
\arctan\!\left(\frac{2y}{1-x^2-y^2}\right)},
\qquad x^2+y^2<1.
$$
The exceptional boundary endpoints are precisely the jump points of the prescribed data.