Keeping air in a well Let's say I've got an Earth-like planet with no atmosphere: it's just a barren ball of rock. I want to live there, but I don't like domes, so instead I'm just going to dig a big hole and let gravity keep the air in.
How deep a hole do I need?
According to a chart I found, the density of the atmosphere drops to pretty much zero by about 50km, at the top of the stratosphere. But 'pretty much zero' is not zero; the mesosphere beyond that extends up to about 80km and while vanishingly thin is responsible for dealing with most meteors.
If my hole is a mere 50km deep, then, some of my air is going to diffuse out of the hole and onto the planet's surface. But the surface of my planet is largely flat; there's nowhere for the air to go, so it's just going to hang around and form a dynamic equilibrium. (Unlike, say, if I built a 50km wall and tried to keep the air inside. Air would leak over the top of the wall, fall down into the vacuum on the other side, and be lost forever. Which is why the Ringworld had walls 1000km high.)
So I don't really know how shallow a hole I can get away with. I can replace the air, but I would like it to go without maintenance for at least small geological timescales. Any advice before I start up the earth-moving equipment?
(Yes, it's SF worldbuilding.)
 A: Even a normal planet doesn't permanently lock its atmosphere: a little bit of it is creeping out all the time.  The air molecules are distributed according to a Maxwell-Boltzmann distribution, which falls off to zero exponentially.  A small fraction of that air will always be above escape velocity and will disappear into space.  The distribution of air re-thermalizes, and thus another fraction is lost to space.  The fraction that is above escape velocity depends on the mass of the molecule: it's appreciable for helium on Earth (popped balloons are gone forever).
For your deep well, you'd have to consider the shape of the Maxwell-Boltzmann distribution and the variation of pressure with altitude (and include a non-Earth "g").  Frame the problem in terms of the amount of loss that you're comfortable with--- something so small that it won't be missed or can easily be replenished.
Someone who's actually engineering this might also want to chill the upper layer of gas with some kind of large-scale air conditioning.  That would reduce the loss so that the hole wouldn't need to be as deep.  Maybe a greenhouse effect could be useful to keep the upper layer cold and the lower layer warm.  After all, who needs to see the sun?
