A computational laboratory is proposed for secondary school students to facilitate the learning process of the Infrared (IR) spectra of water and carbon dioxide. In the context of the greenhouse effect, which is the macroscopic phenomenon related to the rate of cooling of our planet in response of being warmed by the sun, students can learn its molecular origin with the support of computer through the simulation of the vibrational spectra of water and carbon dioxide. Input files as well as data are provided so that the laboratory can be proposed even when computational facilities are not available. In particular, the role of computer in chemistry teaching and learning is established because molecular models let the students visualize the subnanometric world which remains elusive in daily experience.