Multi-layer model of CO2 exchange in a plant community coupled with the water budget of leaf surfaces