Functional relations of root distributions with the flux and uptake of water and nitrate