Interplay between temperature-activated vibrations and nondipolar effects in the valence excitations of the CO2 molecule