seaDatumElevation

function seaDatumElevation
universe/src/terrain.ts:711
seaDatumElevation(surface: SurfaceParameters) → number | null

The elevation the ocean surface sits at, or null on a dry world.

Exported because "the single owner of the sea clamp" has to own the number as well as the comparison. A second reader — the survey's shore search, which has to score against the unclamped landform and therefore cannot go through groundElevation — copied the expression out and put the formula in two places, which is exactly the shape of the bug the docstring above remembers. Change the remap here and both move together.

Scaled by the hypsometry band's share of the budget, not by a constant, and that is what makes the datum land between the ocean floor and the continents rather than beside them. Oceanic plates sit at −0.55 to −1 of that share and continental ones at +0.15 to +0.45; 2s − 1 over the drawn range of seaLevel runs from −0.7 to +0.1, which crosses the first group and not the second. A fixed fraction of maxElevation would put the datum below every seabed on a world whose grammar spends most of its relief on craters, and the ocean would be a dry basin with a sea level in it.

surfaceSurfaceParameters
Undocumented
Returnsnumber | null