	program top25
c
c	count number of orbits and keepers for each ref code.
c	sort this to determine "top 25" lists.
c
	character*3 ref(2000),ref1
	character*1 junk,keep
	integer norb(2000),nkeep(2000)
	dimension frac(2000)
c
	open(10,file='orb6.master',status='UNKNOWN')
	open(11,file='top25.new',status='UNKNOWN')
c
	do 100 n=1,4
  100	read(10,901) junk
  901	format(a1)
c
	do 150 n=1,2000
	ref(n)='   '
	norb(n)=0
	nkeep(n)=0
  150	continue
	norbtot=0
	nkeeptot=0
c
	read(10,902) ref1,keep
  902	format(t252,a3,t250,a1)
	nref=1
	ref(nref)=ref1
	norb(nref)=1
	if (keep .eq. 'y') nkeep(nref)=1
c
  200	read(10,902,end=600) ref1,keep
	if (ref1 .eq. '   ') go to 200
	do 300 n=1,nref
	if (ref1 .ne. ref(n)) go to 300
	norb(n)=norb(n)+1
	if (keep .eq. 'y') nkeep(n)=nkeep(n)+1
	go to 200
  300	continue
	nref=nref+1
	ref(nref)=ref1
	norb(nref)=1
	if (keep .eq. 'y') nkeep(nref)=1
	go to 200
c
  600	do 700 n=1,nref
	norbtot=norbtot+norb(n)
	nkeeptot=nkeeptot+nkeep(n)
	frac(n)=float(nkeep(n))/float(norb(n)) * 100.
	write(11,903) ref(n),norb(n),nkeep(n),frac(n)
  903	format(a3,2i5.3,f6.1)
  700	continue
c
	fractot=float(nkeeptot)/float(norbtot) * 100.
	write(11,904) norbtot,nkeeptot,fractot
  904	format(/'ALL',2i5.3,f6.1)

  999	stop
	end

	

