What are the factors that contribute to the net primary productivity within an ecosystem?