Solution (source code)

= Solution

Let $\tau_\nu$ increase downward and let $\mu>0$ be the outward direction cosine. Assume a plane-parallel, static, nonscattering atmosphere in <local thermodynamic equilibrium>, so the source function is $B_\nu[T(P)]$. Hydrostatic balance gives
$$
d\tau_\nu=\frac{\kappa_\nu(P,T)}{g}\,dP.
$$
The <formal solution of the radiative transfer equation> between $P_1>P_2$, corresponding to $\tau_1>\tau_2$, is
$$
\boxed{I_\nu(P_2,\mu)
=I_{\nu,1}e^{-(\tau_1-\tau_2)/\mu}
+\int_{\tau_2}^{\tau_1}
B_\nu[T(t)]e^{-(t-\tau_2)/\mu}\frac{dt}{\mu}}.
$$
For an isothermal atmosphere, $B_\nu(T)$ is constant and
$$
\boxed{I_\nu(P_2,\mu)
=I_{\nu,1}e^{-\Delta\tau_\nu/\mu}
+B_\nu(T)(1-e^{-\Delta\tau_\nu/\mu})}.
$$
If the lower boundary is itself thermalized, $I_{\nu,1}=B_\nu(T)$ and the upward intensity remains the blackbody value.