The solar engine and its influence on terrestrial atmosphere and climate