Process for purification and conversion of carbon dioxide using renewable energy