The depth of the root zone affects and is affected by the dynamics of water in the shallow subsurface. Using a stochastic model of soil-moisture dynamics along with a carbon cost-benefit analysis, a water-optimal root depth is determined as a function of climate, soil, and vegetation characteristics. Changes to precipitation intensity, frequency, and amount affect this depth and the partitioning of soil moisture among evaporation, transpiration, and recharge fluxes. For a given climate β fixed average precipitation and potential evapotranspiration β the optimal root depth and recharge flux both decrease with increasing precipitation frequency (and decreasing intensity). Evaporation increases as the frequency of precipitation increases, and the transpiration flux often displays a maximum for intermediate values of precipitation frequenc