c$Author: fredfox $ c$Date: 2001-08-15 23:21:12 $ c$Revision: 1.7.4.3 $ c$Source: /weru/cvs/weps/weps.src/hydro/store.for,v $ real function store (minlay, maxlay, prevvolw, volw, laydepth) c + + + PURPOSE + + + c determines the infiltration depth of water from the soil surface (mm) c by checking for an increase in soil water content. c The depth is set to the layer where the soil water content has c not increased. The value is always set to include the first layer c since it will not be called unless water has been added. c c + + + ARGUMENT DECLARATIONS + + + integer minlay, maxlay real prevvolw(*), volw(*), laydepth(*) c + + + ARGUMENT DEFINITIONS + + + c layrsn - Number of soil layers used in the simulation c prevvolw(layrsn+6) - beginning of day volume of water in the soil profile (m) c volw(layrsn+6) - after event volume of water in the soil profile (m) c laydepth(layrsn) - depth to bottom of soil layer (mm) c + + + LOCAL VARIABLES + + + integer lrx c + + + LOCAL DEFINITIONS + + + c lrx - Loop counter c + + + END SPECIFICATIONS + + + c distribute the daily amount of water available for infiltration c into the soil profile throughout the simulation layers. store = laydepth(1) do lrx = minlay+1,maxlay if( volw(lrx).gt.prevvolw(lrx) ) then store = laydepth(lrx-minlay+1) else exit endif end do return end