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.)