subroutine spread(fc,xwidth,shd) c c 0< shd <1.0 c implicit none include 'itg.par' c real fc(lz),fc2(lz),charac(lz),xwidth,shd,f2max,flimit,y integer l c include 'itg.cmn' c if(shd.lt.0.0.or.shd.gt.1.0) then shd=0.9 endif c f2max=0.0 do 10 l=1,ld fc2(l)=fc(l)*fc(l) if(fc2(l).ge.f2max) f2max=fc2(l) 10 continue c flimit=(1.0-shd)*(1.0-shd)*f2max c do 20 l=1,ld charac(l)=0.0 y=fc2(l) if(y.gt.flimit) charac(l)=1.0 20 continue c xwidth=0.5*charac(1)*dr(1) do 30 l=2,ldb xwidth=xwidth+charac(l)*dr(l) 30 continue xwidth=xwidth+0.5*charac(ld)*dr(ld) xwidth=0.5*xwidth c if(xwidth.lt.1.0e-33) then xwidth=1.0 endif c return end