Solution (source code)

= Solution

The clockwise boundary <integral> at $z=0$ is
$-\int_0^{2\pi}a^4(\sin^4\phi+\cos^4\phi)d\phi=-3\pi a^4/2$. Direct integration of the curl over the side and top gives the same value (the $h$-dependent terms cancel), verifying Stokes.