c c c ----------------------< Begin Bofu Yu's Corrections: >--------------------- c c subroutine alphb c c This subroutine computes alpha, a dimensionless parameter that c expresses the ratio of the max 30-min rain to total rain. c c This subroutine was re-written by B. YU on June 30, 1999. c include 'cbk3.inc' c read: ida c ida - Julian Day of Year. Used as a subscript to R. c include 'cbk4.inc' c read: mo c mo - The current month (1=Jan, 2=Feb...). c include 'cbk5.inc' c read: r c r - Daily Precipitation amount (inches of water) c include 'cbk7.inc' c read: k7 c k7 - Seed for random number generation. c include 'cbk9.inc' c read: wi,ab,ab1,rn1 c write: r1 c c dimension k7(4) c c + + + FUNCTION DECLARATIONS + + + real dstg c + + + LOCAL VARIABLES + + + real tmax, ai, ajp, ei c + + + END SPECIFICATIONS + + + ei=r(ida)-sml c ei is the rainfall for the c day in inches since sml = 0, B.YU ai=ab1/(wi(mo)-ab) c ai is basically 1/alpha c ab is the lower bound =0.02083 c ab1 = 1 - ab, B.YU if (ei .lt. 1.0) then ajp = 1. c c if rain < 1 inch, the upper bound is 1, by c else c in CLIGEN 4.2, if rain > 1 inch, the upper bound is reduced c after Arnold and Williams (1989). This may be all right for c middle latitude without high intensity rain. Note that c the observed maximum 30-min rain ever recorded can be as high as c 299 mm (Linsley et al 1982). This max. 30-min rain in mm was c estimated by Rmm = 417.*t(hr)**0.48. B.YU. 125 mm is used c here to be consistent with Arnold and Williams (1989). c Probably more work is required here. tmax = 125./25.4 c ajp=1.0-exp(-tmax/ei) endif c generate random number using parameter ai c and seed k7, by r1=dstg(ai,k7,rn1) c This basically re-scales r1 which is in the c range from 0 to 1 into the range from c ab to ajp, where ajp is the upper bound. by r1=(ei*(ab+r1*(ajp-ab))+sml*ab)/r(ida) c return end