Solar variation over the last thirty years.
Variations in solar output have been the cause of past climate changes. The consensus among climate scientists is that changes in solar forcing probably had a slight cooling effect in recent decades. This result is less certain than some others, with a few papers suggesting a warming effect.
Greenhouse gases and solar forcing affect temperatures in different ways. While both increased solar activity and increased greenhouse gases are expected to warm the troposphere, an increase in solar activity should warm the stratosphere while an increase in greenhouse gases should cool the stratosphere. Observations show that temperatures in the stratosphere have been cooling since 1979, when satellite measurements became available. Radiosonde (weather balloon) data from the pre-satellite era show cooling since 1958, though there is greater uncertainty in the early radiosonde record.A related hypothesis, proposed by Henrik Svensmark, is that magnetic activity of the sun deflects cosmic rays that may influence the generation of cloud condensation nuclei and thereby affect the climate. Other research has found no relation between warming in recent decades and cosmic rays. A recent study concluded that the influence of cosmic rays on cloud cover is about a factor of 100 lower than needed to explain the observed changes in clouds or to be a significant contributor to present-day climate change.