Some features of hydro- and thermo-dynamics, as applied to atmospheres and to stellar structures, are puzzling: (1) the suggestion, first made by Laplace, that our atmosphere has an adiabatic temperature distribution, is confirmed for the lower layers, but the explanation for this is very controversial; (2) the standard treatment of relativistic thermodynamics does not favor a systematic treatment of mixtures, such as the mixture of a perfect gas with radiation; (3) the concept of mass density in applications of general relativity to stellar structures is less than completely satisfactory; and (4) arguments in which a concept of energy and entropy play a role, in the context of hydro-thermodynamical systems and gravitation, are not always convincing. It is proposed that a formulation of thermodynamics as an action principle may be a suitable approach to adopt for a new investigation of these matters. This paper formulates the thermodynamics of ideal gases in a constant gravitational field in terms of the Gibbsean action principle. This approach, in the simplest cases, does not deviate from standard practice, but it lays the foundations for a more systematic approach to the various extensions, such as the incorporation of radiation, the consideration of mixtures and the integration with general relativity. We study the interaction between an ideal gas and the photon gas and the propagation of sound in a vertical, isothermal column. We determine the entropy that allows for the popular isothermal equilibrium and introduce the study of the associated adiabatic dynamics. This leads to the suggestion that the equilibrium of an ideal gas must be isentropic, in which case, the role of solar radiation would be merely to compensate for the loss of energy by radiation into the cosmos. An experiment with a centrifuge is proposed, to determine the influence of gravitation on the equilibrium distribution with a very high degree of precision.