In almost every textbook I have seen, pressure is said to be one of the most important state variables of a thermodynamical system. But if the system is three-dimensional and on planet Earth, it is not constant! This problem, however, is neglected in every reference I consulted. It seems to me that it is to be addressed, since there is also potential energy (that makes the energy of the particles dependent on height) to consider. The only solution I see is to assign a thermodynamical system for each infinitesimal height of the volume of the actual system. But considering, for example, a chemical reaction occurring in a bucket of water, how can it be described in terms of Gibbs free energy, that is useful only when the pressure is constant?