Trees growing higher on the slopes will soak up water before it can run into rivers, study says.