What keeps the different gases mixed in the atmosphere?

Consider a gas centrifuge holding two different gases. After spinning for a while, the heavier gas will move to the outside, and the lighter gas will be on the inside. In other words, we have stratified the gases.

Why hasn't this happened in Earth's atmosphere for N$_2$ and O$_2$?

Note: I'm not considering Earth a centrifuge because it's rotating. I'm comparing it to a centrifuge because there's a weight (gravity) on the gases. In this case, the oxygen should settle to the bottom, and the nitrogen above it.

-

It's because gases also diffuse. If you separate two gases of different densities by a horizontal membrane, and then slowly remove the membrane, then the interface will diffuse. You can try this with bromine and air, for example – the bromine will stay at the bottom (easily visible because it's brown) and the air will stay at the top, but the interface will be diffuse. The bromine will largely stay at the bottom because it's significantly heavier than the air, but the diffusive mixing will be much stronger if the density difference is smaller – as is the case with nitrogen and oxygen, which are of course not very different in density.

While the effect above just considers mixing due to molecular diffusion, the atmosphere of course also vigorously convects due to the effects of thermal heating (and humidity differences). Both also turn over the atmosphere and mix it.

That said, the composition of the atmosphere does change with altitude. See, for example, here. The thing is that the thickness of layer corresponding to the blurry interface between bromine and air is about as thick as the entire atmosphere, and therefore hard to distinguish from other effects (such as ionization) that change its composition with altitude.

-
Point taken that O2 and N2 have very similar mass. However, looking at the chart you linked to only makes me marvel all the more. How in the world does the composition mixture ratios stay so similar all the way out to 100 km and more? Violent winds weather only exist in the troposphere AFAIK. Do convection cells really extend up to 100+ km? Can diffusion and convection really mix it up that far out? – DrZ214 Feb 1 at 5:08
@DrZ214 The stratosphere and mesosphere have plenty of time. – gerrit Feb 1 at 10:47
@gerrit What does that mean exactly? If it has plenty of time to mix, then it has plenty of time to stratify by gravity too. – DrZ214 Feb 1 at 10:48
@DrZ214 True, but up to the homopause (by definition), mixing wins. – gerrit Feb 1 at 10:50
@Chieron: "Major vertical convection does indeed extend up to the Mesopause (~95 km)." This can't be true for the stratosphere, as defined by its inverse temperature gradient. Convection only works for positive temperature gradients. Also strong winds are unstable which leads to turbulent mixing. – AtmosphericPrisonEscape Feb 2 at 0:38

Diffusion is important, but much more important is the turbulent stirring from all manner of processes such as convective clouds, hurricanes, Hadley cells, frontal systems, jet streams, etc. This is more than enough to keep the atmosphere's component gasses well mixed.

-