A heat production model of the crust and upper mantle