Thermal evolution of gas from a solid following detrapping and diffusion during a linear tempering schedule