Energy flow through ecosystems