Solution (source code)

= Solution

Put $K(r)=e^{s(r)}$. The <perfect gas> relation in the question becomes the <polytropic equation of state>
$$
P=K(r)\rho^\gamma.
$$
At fixed $r$, vertical hydrostatic balance is
$$
\gamma K\rho^{\gamma-1}\frac{\partial\rho}{\partial z}
=-\rho\Omega_K^2z.
$$
After one integration,
$$
\rho^{\gamma-1}
=\rho_0^{\gamma-1}
-\frac{\gamma-1}{2\gamma K}\Omega_K^2z^2.
$$
Defining the midplane <adiabatic sound speed> by $c_{s0}^2=\gamma P_0/\rho_0=\gamma K\rho_0^{\gamma-1}$ gives
$$
\boxed{\rho=\rho_0
\left(1-\frac{z^2}{H^2}\right)^m},
\qquad
\boxed{m=\frac1{\gamma-1}},
\qquad
\boxed{H^2=\frac{2c_{s0}^2}{(\gamma-1)\Omega_K^2}}.
$$
This is a vertically truncated <polytropic atmosphere>; the physical perfect-gas case has $\gamma>1$.