Effects of stand structure and physiology on forest gas exchange: a simulation study for Norway spruce