An investigation of the absorption spectra of water and ice, with reference to the spectra of the major planets