subroutine r5mon i (tp6) c c + + + PURPOSE + + + c Smoothes and corrects .r hour monthly rainfall intensity data. c c + + + ARGUMENT DECLARATIONS + + + real tp6 c c + + + ARGUMENT DEFINITIONS + + + c tp6 - maximum 6 hour precipitation depth (inches). c c + + + COMMON BLOCKS + + + include 'cbk9.inc' c modify: wi c wi - Average Maximum .5 Hour Precip. Intensity (by month) c include 'cbk7.inc' c modify: rst,prw c rst(i,j) - Array Of Monthly precipitation stats. c dim1: month 1..12 c dim2: 1=mean of daily rainfall c mean liquid equivalent precipitation c depth (inches) for a day precipitation c occurs (by month) [=avg total precip c for month / # wet days in month] c 2=std deviation of daily rainfall c standard deviation of the daily precip c value (inches) (by month) c 3=skew coefficient of daily rainfall c c prw(1,12) - monthly probability of wet day after wet day c prw(2,12) - monthly probability of wet day after dry day c include 'cbk4.inc' c read: nc c nc - Number of days in the (non-leap) year preceeding each month. c c + + + LOCAL VARIABLES + + + integer i real xy2, xm, r25, f c + + + END SPECIFICATIONS + + + c real sm(12),smm(12) c xy2=0.5/tp6 c ---- convert WI in inches to WI in mm. do 10 i=1,12 wi(i)=wi(i)*25.4 10 continue c c ---- average each month's WI with the month on either side. sm(1)=(wi(12)+wi(1)+wi(2))/3.0 do 20 i=2,11 sm(i)=(wi(i-1)+wi(i)+wi(i+1))/3.0 20 continue sm(12)=(wi(11)+wi(12)+wi(1))/3.0 c do 30 i=1,12 if(prw(1,i).eq.0.0) prw(1,i)=0.01 if(prw(2,i).eq.0.0) prw(2,i)=0.01 if(rst(i,1).eq.0.0) rst(i,1)=0.01 xm=nc(i+1)-nc(i) c -- XXX -- The equation below is backwards from the one to compute c Historic Monthly Precip amount -- CRM -- 7/30/00. smm(i)=xm*prw(1,i)/(1.0-prw(2,i)+prw(1,i)) r25=rst(i,1) f=xy2/smm(i) wi(i)=-sm(i)/alog(f) wi(i)=1.0-exp(-wi(i)/r25) if (wi(i).lt.0.1) wi(i)=0.1 if (wi(i).gt.0.95) wi(i)=0.95 30 continue c return end