Convection is one of the basic types of the flows used in description of processes of the Earth's interior and the Earth's atmosphere. The simulation of convection of many geological systems under the assumption of an incompressible medium in the Boussinesq approximation often appears to be poor and the model of a compressible medium is used not only when simulating processes in the atmosphere, but, also, when simulating dense media of such geological systems as magmatic fluid systems, the convective upper mantle with allowance for phase transitions, dynamics of magma in deep chambers and magma-conductors, a convective warm-up of the lithosphere magmatic fluids, dynamics of liquid hydrothermal systems with allowance for magma boiling and hydrothermal solution, condensation of a gas, etc. In the given paper, a numerical model for analysis of dynamics of such media with variable kinetic and thermodynamic parameters is constructed. The choice of a numerical algorithm was determined by the necessity to ensure the physical correctness of the solution at arbitrary spatial and time scales of the system under investigation as a large spatial scale of the system and large times of its evolution make it difficult to carry out laboratory simulation as well as field measurements. The control volume method satisfies this condition.