Solution (source code)

= Solution

Measure $z$ downward from the iceberg surface. Its <mass density> is $\rho_i(z)=300+12z$ for $0\leq z\leq50$ m and $900\,\mathrm{kg\,m^{-3}}$ below that. The mass per unit horizontal area is
$$
\frac mA=\int_0^{50}(300+12z)\,dz+\int_{50}^{300}900\,dz=30000+225000=255000\,\mathrm{kg\,m^{-2}}.
$$
By <Archimedes' principle>, the draft is $d=(m/A)/\rho_w\simeq248.78$ m. The <iceberg freeboard> is therefore $300-d\simeq51.22$ m. The specified snow-to-ice density is reached at
$$
z_t=\frac{800-300}{12}\simeq41.67\,\mathrm m,
\qquad\boxed{z_t\text{ lies about }9.55\,\mathrm m\text{ above the waterline}.}
$$
The more porous <snow> and <firn> are consequently above water: atmospheric warming, meltwater infiltration, compaction and refreezing can modify them. At the waterline and below, dense ice is exposed to oceanic <heat transfer> and wave erosion, which can undercut the berg and cause breakage. If the porous transition were submerged, water infiltration and ocean heat could act directly on that material, changing the erosion and collapse mechanisms.