Sustainability in the Presence of Global Warming: Theory and Empirics