An integrated model of canopy micrometeorology and exchanges of mass and energy was developed and tested for a two-story boreal forest. Roles of different elements of this forest ecosystem in determining net ecosystem exchanges (NEEs) of sensible heat, water vapor and CO2 were analyzed by using the model. In this model, plant canopies are divided vertically into multiple layers. It first predicts profiles of air temperature, water vapor and CO2 partial pressures inside plant canopies by using the localized near-field (LNF) theory. Then from these predicted profiles, exchanges of sensible heat, water vapor and CO2 in each layer are computed. Canopy-scale fluxes are obtained by integrating these exchanges over the canopy depth. The model was tested against measurements for diurnal cycles of canopy net radiation, sensible heat flux, water vapor flux, CO2 flux, friction velocity, and profiles and diurnal cycles of air temperature, water vapor partial pressure and CO2 concentration. Once tested, the model was used to decompose NEEs into contributions from different ecosystem elements. The results showed that daytime exchanges of energy and mass in this two-story boreal forest were largely controlled by the overstory even through its LAI was smaller than that of the understory. However, the degree of dominance varied for sensible heat, water vapor and CO2, and from daytime to nighttime. Relative contributions of different ecosystem elements to NEEs of sensible heat and water vapor remained largely unchanged from day to day during the testing period. In contrast, relative contributions of different ecosystem elements to NEE of CO2 fluctuated significantly from day to day in responses to changes in environmental conditions. The role of the understory was most significant for the CO2 exchange and least significant for the sensible heat exchange with the water vapor exchange in the intermediate. The soil and stem respirations balanced much of the foliage CO2 absorption during the daytime while during the nighttime they dominated the CO2 exchange. The contribution from soil to the NEEs of sensible heat and water vapor was trivial.