subroutine wshcqi c c + + + PURPOSE + + + c c SR WSHCQI calculates the inflow volume into a channel and c the duration of the event for that channel. c c Called from: SR WSHDRV c Author(s): Ascough II, Baffaut c Reference in User Guide: c c Version: c Date recoded: c Recoded by: c c + + + KEYWORDS + + + c c + + + PARAMETERS + + + c include 'pmxcsg.inc' include 'pmxelm.inc' include 'pmxhil.inc' include 'pmximp.inc' include 'pmxpln.inc' include 'pmxprt.inc' c c + + + ARGUMENT DECLARATIONS + + + c c + + + ARGUMENT DEFINITIONS + + + c c + + + COMMON BLOCKS + + + c include 'cchpek.inc' include 'cdiss11.inc' c include 'cdist2.inc' include 'cefflen.inc' c include 'cirspri.inc' include 'cstore.inc' include 'cstruc.inc' include 'cstruct.inc' c c + + + LOCAL VARIABLES + + + c c + + + LOCAL DEFINITIONS + + + c c + + + SAVES + + + c c + + + SUBROUTINES CALLED + + + c c + + + DATA INITIALIZATIONS + + + c c + + + END SPECIFICATIONS + + + c c Compute the runoff volume coming onto the channel element and c convert it into runoff depth over the channel area c c total runoff volume entering channel laterally (may come from c hillslopes or impoundments) c rvolat(ielmt) = tmpvol(nhleft(ielmt)) + tmpvol(nileft(ielmt)) + 1 tmpvol(nhrght(ielmt)) + tmpvol(nirght(ielmt)) c c c total runoff volume entering channel from top (may be fed c from hillslope, impoundment, or multiple channels) c c even though channels are read in as feeding from the left, c right, or top, all channels really feed another channel from c the top only - for this reason ncleft(ielmt), ncrght(ielmt), and c nctop(ielmt) are summed under rvotop(ielmt) c rvotop(ielmt) = tmpvol(nhtop(ielmt)) + tmpvol(ncleft(ielmt)) + 1 tmpvol(ncrght(ielmt)) + tmpvol(nctop(ielmt)) + 1 tmpvol(nitop(ielmt)) c c total runoff volume and depth added to channel through c lateral and top runon c rvolon(ielmt) = rvolat(ielmt) + rvotop(ielmt) roffon(ielmt) = rvolon(ielmt) / charea(iplane) c c the duration for the channel element is the maximum c duration of the watershed elements that may feed it c and is calculated in case there is no runoff produced c on the channel (in which case SR TRNLOS may be called c to estimate transmission losses) c watdur(ielmt) = amax1(watdur(nhleft(ielmt)), 1 watdur(nhrght(ielmt)),watdur(nhtop(ielmt)), 1 watdur(ncleft(ielmt)),watdur(ncrght(ielmt)), 1 watdur(nctop(ielmt)),watdur(nileft(ielmt)), 1 watdur(nirght(ielmt)),watdur(nitop(ielmt)),dur,irdur) c efflen(ichan) = amax1(efflen(idelmt(ncleft(ielmt))), 1 efflen(idelmt(nctop(ielmt))), 1 efflen(idelmt(ncrght(ielmt))), 1 0.0) efflen(ichan) = efflen(ichan) + slplen(ichan) c return end