D. Molecules gain energy in the endothermic process of melting. The phase change from solid to liquid consumes energy, cooling the atmosphere around it in excess of the cooling that occurs as ice warms. This also causes the ice to maintain a temperature at or very near 32 degrees Fahrenheit (0 degrees Celsius) as it melts.