Hmmm, ignoring for now surface perturbation from the sphere (both mountains/valleys and the generally ellipsoid nature of a rotating planet), we're talking about differentiating (or integrating, depending on which way round you're wanting to do it) thin spherical shells of gas of increasing diameter and reducing density (and thus weight according to gravitational influence, this contributing to the pressures upon the lower shells) up until the point that all the 'gas mass' is used up (so that it fades to zero density at that level).
Or, if there is still "gas to give" at the point where the pressure at any level is greater than (or significantly approaches?) the gravitational attraction by the planet below, you're going to find yourself sloughing off the extra gaseous mass until you're about equal again[1]
It sounds like a catenary-like calculation (or, at least, half-a-catenary) with an extra dimension or two to it and a varying 'force' along its length. I's been a while since I've done this sort of thing, but I might see what I can dredge out of my rustier parts of my brain, for this one, if nobody beats me to it.
(Though the above isn't counting other issues like solar wind whipping around the upper levels. Or, right now, stratification of gas-types or even of atmospheric temperatures, which we know from Earthly meteorology and the like doesn't even change constantly on its way to the "too tenuous to really matter" layers.)
[1] Although gas giants exist, so maybe the extra gas means extra pressure, thus denser lower layers that 'use up' more gas-mass so that the whole atmosphere 'drops' into the well where gravity exceeds the local pressure. Maybe it's like black-holes, in that you need enough mass to
create the self-same mass-holding situation, but be on the 'too little' side of the worst-case scenario and you don't have enough. It could just be the low temperatures, except that there's extrasolar 'hot Jupiters'... Again, modelling needed. Though I
imagine that this has been extensively done already, even if only with partial understanding to get theory to explain observation.