Program raintotal Integer i,j,nx,ny,nz Parameter(nx=500,ny=60000) Real rmax(nx),total(nx),timee1(nx) Real timeb(nx),timee(nx),rpar(ny) real rr2(ny),rparsivel(nx),rtbucketa(nx) Real rtbucketb(nx),rhrrr(ny) Real rhrrr0(nx) Integer iyr(nx),jds(nx),ks(nx),ms(nx) Integer jde(nx),ke(nx),me(nx),idur(nx) Integer jpar(ny),kpar(ny),mpar(ny) Integer jasos(ny),kasos(ny),masos(ny) Integer jg2(ny),kg2(ny),mg2(ny) Integer jus(ny),kus(ny),mus(ny) Integer jhrrr(ny),khrrr(ny) Character*1 ff Character*50 infile01,infile02,infile03,infile04 Character*50 infile05,infile06 Character*80 outfile,outfile01 open(10,file='fileraintotalparsiveltbhrrr', * status='unknown') ff=':' read(10,12)infile01,infile02,infile03,infile04,outfile, * outfile01 12 format(a34,1x,a38,1x,a38,1x,a44,1x,a38,1x,a44) open(11,file=infile01,status='unknown') open(12,file=infile02,status='unknown') open(13,file=infile03,status='unknown') open(14,file=infile04,status='unknown') open(20,file=outfile,status='unknown') open(21,file=outfile01,status='unknown') c read parsivel k1=1 do i=1,nx read(11,22,err=999,end=999)i1,j1,ka,ma,j2,kb,mb,id,rm,tot iyr(k1)=i1 jds(k1)=j1 ks(k1)=ka ms(k1)=ma jde(k1)=j2 ke(k1)=kb me(k1)=mb idur(k1)=id rmax(k1)=rm total(k1)=tot timeb(k1)=float(ka)/24.+float(j1) timee(k1)=float(kb+1)/24.+float(j2) k1=k1+1 22 format(2i5,i5,1x,i2,2i5,1x,i2,i5,f8.1,f8.2) 999 enddo k1=k1-1 print*,k1 c read tipping bucket a k2=1 do i=1,ny read(12,*,err=998,end=998)ia,jg2(k2),kg2(k2), * mg2(k2),isec k2=k2+1 998 enddo k2=k2-1 print*,k2 c read tipping bucket b k3=1 do i=1,ny read(13,*,err=997,end=997)ia,jus(k3),kus(k3), * mus(k3),isec0 k3=k3+1 997 enddo k3=k3-1 print*,k3 c read hrrr k4=1 do i=1,ny read(14,*,err=996,end=996)ia,jhrrr(k4),khrrr(k4), * ctot,rhrrr(k4) k4=k4+1 996 enddo k4=k4-1 print*,k4 ik=0 do i=1,k1 c tb_a raintba=0. ipl=0 do j=1,k2 timepl=float(kg2(j))+float(mg2(j))/60. timepl0=timepl/24.+float(jg2(j)) if(timepl0 .ge.timeb(i) .and. timepl0.le.timee(i))then raintba=raintba+ 0.254 ipl=ipl+1 endif enddo c tb_b raintbb=0. ius=0 do j=1,k3 timeus=float(kus(j))+float(mus(j))/60. timeus=timeus/24.+float(jus(j)) if(timeus .ge.timeb(i) .and. timeus.le.timee(i))then raintbb=raintbb+0.254 ius=ius+1 endif enddo c hrrr rainhrrr=0. do j=1,k4 timehrrr=float(khrrr(j))/24.+float(jhrrr(j)) if(timehrrr .ge.timeb(i) .and. timehrrr.le.timee(i))then rainhrrr=rainhrrr+rhrrr(j) endif enddo if(total(i).gt.2. .and. rainhrrr.gt.1.)then ik=ik+1 rbias00=(total(i)-rainpar) rbias01=(total(i)-raintba)/((total(i)+raintba)/2.) write(20,23)iyr(i),jds(i),ks(i),ff,ms(i),jde(i),ke(i),ff, * me(i),idur(i),rmax(i),total(i),raintba,raintbb,rainhrrr rparsivel(ik)=total(i) rtbucketa(ik)=raintba rtbucketb(ik)=raintbb rhrrr0(ik)=rainhrrr endif 23 format(2i5,i5.2,a1,i2.2,i5,i5.2,a1,i2.2,i5,f8.1,20f8.2) enddo call stats(rhrrr0,rparsivel,biasab,abiasab,rcor,nx,ik) write(21,39)ik,biasab,abiasab,rcor call stats(rhrrr0,rtbucketa,biasab,abiasab,rcor,nx,ik) write(21,39)ik,biasab,abiasab,rcor call stats(rhrrr0,rtbucketb,biasab,abiasab,rcor,nx,ik) write(21,39)ik,biasab,abiasab,rcor 39 format(i5,3f10.3) stop end