Thermal effects of magma degassing