A relation describing the change in the amount of energy stored within a defined volume owing to flows of energy across the boundary of the volume. A change in the amount of stored energy, due for example to the advection or conduction of heat or the absorption or emission of radiation, will result in a change in the temperature or the phase, or both, of the material in the volume. Phase changes, in particular melting and freezing but also sublimation and deposition, couple the energy balance strongly to the mass balance. For example they determine the amount of ablation by melting and sublimation, and so the energy balance must be determined using either an energy-balance model or a temperature-index model in any attempt to model ablation. The surface energy balance is that of an interface or degenerate volume, the thickness of which approaches zero, at the surface of the glacier. Glaciers also have internal and basal energy balances. In cold glaciers and some polythermal glaciers, the largest component of the internal energy balance is usually the heat source due to refreezing. In both the internal and basal energy balances, friction is a mechanical source of heat and heat is conducted (or advected) between adjacent volumes that are not isothermal. The geothermal heat flux is usually a significant term in the basal energy balance and basal mass balance of grounded ice, but the resulting contribution to the climatic-basal mass balance is generally small. Exchanges of heat with sea or lake water must be considered where the ice is afloat.