Life-cycle model of terrestrial carbon exchange