Determination of abundances of gases from solar spectra