Program particle Parameter(nx=2950000,ny=100) Parameter(nb=15600000,ns=80) Parameter(nu=1) Integer ksave(nx),msave(nx) integer ipsd(ny),irect(nx) integer ipar(nx),irecs(ns) integer jsave(nx),isecs(nx) integer ksv(nx),msv(nx) double precision dmm real elmax(nx),elmin(nx) real orient(nx),dsv(nx) real dsave(nx),psd(ny),cor(ny) character*60 infile,outfile,infile2 Character*60 outfile2,outfile3,infile4 Character*60 infile5 Open(10,file='fileparticlerain',status='unknown') Open(14,file='filetrackrain',status='unknown') open(18,file='pip_diameter_table_2022.txt', * status='unknown') do i=1,ny read(18,*)da,actual,psdcal,cor(i) enddo do ll=1,nu read(10,30)na,infile,outfile,outfile2,outfile3 30 format(i3,1x,a10,1x,a36,1x,a35,1x,a39) read(14,31)infile4 31 format(4x,a15) open(11,file=infile,status='unknown') open(15,file=infile4,status='unknown') open(20,file=outfile,status='unknown') open(21,file=outfile2,status='unknown') open(22,file=outfile3,status='unknown') do i=1,na read(11,32)infile2 read(15,38)infile5 32 format(a41) 38 format(a35) open(12,file=infile2,status='unknown') do k=1,10 read(12,*) enddo k1=0 do k=1,nx read(12,*,err=999,end=999)irec,ic,isite,time,ft,iread,iyear, * mon,iday,kh,mn,isec,pt,frame,xcen,ycen,hole,emax,emin,tot,dmm, * dlong,part,rec,recss,hy,diag,ucol,rcol,upy,lowy,boxx,boxy, * mingrey,jq,jr if(mon.eq.10)jday=iday+273 if(mon.eq.11)jday=iday+304 if(mon.eq.12)jday=iday+334 if(mon.eq.1)jday=iday if(mon.eq.2)jday=iday+31 if(mon.eq.3)jday=iday+59 if(mon.eq.4)jday=iday+90 if(irec.gt.0 .and. dmm.gt. 0.)then k1=k1+1 ksave(k1)=kh msave(k1)=mn elmax(k1)=emax elmin(k1)=emin dsave(k1)=dmm irect(k1)=irec orient(k1)=part jsave(k1)=jday isecs(k1)=isec endif 999 enddo print*,i,k1,ll open(16,file=infile5,status='unknown') do k=1,5 read(16,*) enddo read(16,*)iyear,mon,iday,ka do k=1,3 read(16,*) enddo if(mon.eq.10)jday=iday+273 if(mon.eq.11)jday=iday+304 if(mon.eq.12)jday=iday+334 if(mon.eq.1)jday=iday if(mon.eq.2)jday=iday+31 if(mon.eq.3)jday=iday+59 if(mon.eq.4)jday=iday+90 k3=1 k2=0 do kk=1,nx read(16,*,err=989,end=989)irec,ipar(k3),krq,dmm, * kgrey,wc,wd,ma if(k3.eq.1)then do ky=1,ns irecs(ky)=0 enddo dave=dmm isay=1 irecs(1)=irec mb=ma endif if(kk.gt.1 .and. ipar(k3).eq.ipar(k3-1))then isay=isay+1 irecs(isay)=irec dave=dave+dmm mb=ma else dave=dave/float(isay) if(k3.gt.1)then do kl=1,k1 if(jday.eq.jsave(kl) .and. ka.eq.ksave(kl) * .and. mb.eq.msave(kl))then do ky=1,ns if(irecs(ky).eq.irect(kl))then write(20,39,err=989)irect(kl),ipar(k3-1),iyear,jday,ka,mb, * isecs(kl),dsave(kl),dave,orient(kl),elmax(kl), * elmin(kl),isay 39 format(2i10,5i5,5f10.3,i5) k2=k2+1 ksv(k2)=ka msv(k2)=mb dsv(k2)=dave endif enddo endif enddo do ky=1,ns irecs(ky)=0 enddo endif isay=1 irecs(isay)=irec dave=dmm mb=ma endif k3=k3+1 989 enddo print*,k3,k1,i,ll k3=k3-1 frame=380.*60. iyear=2021 kh=0 do kk=1,24 mn=0 do kl=1,60 isay=0 do km=1,ny psd(km)=0. ipsd(km)=0 enddo do ku=1,k2 if(ksv(ku).eq.kh .and. * msv(ku).eq.mn)then isay=isay+1 b1=0.0d0 b2=0.2d0 do km=1,ny if(dsv(ku).gt.b1 .and. dsv(ku).le.b2)then dmid=(b1+b2)/2. endif b1=b1+0.2d0 b2=b2+0.2d0 enddo fov=1.e-6*(64.-dmid)*(48.-dmid) dof=0.117/2.*dmid vol=frame*fov*dof a1=0.0 a2=0.2 do km=1,ny if(dsv(ku).gt.a1 .and.dsv(ku).le.a2)then ipsd(km)=ipsd(km)+1 psd(km)=psd(km)+1.*cor(km)/(vol*0.2) endif a1=a1+0.2 a2=a2+0.2 enddo endif enddo if(isay.gt.0)then write(21,18)iyear,jday,kh,mn,(psd(km),km=1,ny) write(22,19)iyear,jday,kh,mn,isay,(ipsd(km),km=1,ny) 18 format(4i5,100f15.4) 19 format(5i5,100i5) endif mn=mn+1 enddo kh=kh+1 enddo enddo enddo stop end