c file name: store.for subroutine store (layrsn, pote, cb, bszlyt, bhzwid) c + + + PURPOSE + + + c This subroutine stores the daily amount of water available for c infiltration into the soil profile throughout the simulation c layers. First, water is stored in the uppermost soil layer, c until the water content of this layer reaches reduced saturation content. c The excess water is then cascaded downward to the succeeding c lower soil layers with the same maximum storage restriction, c until sufficient water storage is obtained. Any excess water c flow out from the bottom of the lowermost simulation layer will c be added to the cumulative amount of daily deep percolation. c Further soil water redistribution is accomplished separately c by subroutine darcy. c DATE: 09/22/93 c MODIFIED: 10/06/93 c MODIFIRD: 10/01/1995 c + + + ARGUMENT DECLARATIONS + + + integer layrsn real cb(*) real pote(*) real bszlyt(*) real bhzwid c + + + ARGUMENT DEFINITIONS + + + c layrsn - Number of soil layers used in the simulation c cb - Power of Campbell's model of the soil water c characteristic curve c pote - Air entry potential of soil water, joules/kg c bszlyt - layer thickness (mm) c bhzwid - water infiltration depth (mm) c + + + COMMON BLOCKS + + + *$noereference include 'p1werm.inc' include 'p1unconv.inc' c + + + LOCAL COMMON BLOCKS + + + include 'hydro/htheta.inc' include 'hydro/hh2o.inc' C *** include 'hydro/hlayrs.inc' *$reference c + + + LOCAL VARIABLES + + + real flow real flow0 real wcf integer lrx c + + + LOCAL DEFINITIONS + + + c flow - Water flow into the top of each layer (mm/day) c flow0 - Water flow into the top of next higher layer (mm/day) c wcf - Field capacity water content for each layer (mm) c lrx - Loop counter c + + + DATA INITIALIZATION + + + flow = dinf c + + + END SPECIFICATIONS + + + c distribute the daily amount of water available for infiltration c into the soil profile throughout the simulation layers. bhzwid = 0.0 do lrx = 1,layrsn wc(lrx) = theta(lrx) * bszlyt(lrx) wc(lrx) = wc(lrx) + flow wcf = thetes(lrx) * bszlyt(lrx) flow0 = flow if ( wc(lrx) .gt. wcf ) then flow = wc(lrx) - wcf wc(lrx) = wcf else flow = 0 end if C C overflow exists so layer is saturated and water depth exceeds layer thickness if (flow.ne.0.0) then bhzwid = bhzwid + bszlyt(lrx) C C if there is flow into a layer and not out calculate partial layer saturation elseif (flow0.ne.0.0) then bhzwid = bhzwid + (flow0/(thetes(lrx)-theta(lrx))) endif end do c determine the daily amount of infiltration water that flow out c from the bottom of the lowermost simulation layer dflout = flow c reinitialization of the soil water contents of the simulation c layers do lrx = 1,layrsn theta(lrx) = wc(lrx) / bszlyt(lrx) end do c when store is only redistributing water excesses from soil consolidation, c do not set the infiltrated depth and cause a second consolidation if( dinf.eq.0.0 ) bhzwid = 0.0 return end