      subroutine tallyw
      integer r
      vector runs(1400)
      vector tagl0(1400),tagr0(1400)
      vector tagl1(1400),tagr1(1400)
      vector tagl2(1400),tagr2(1400)
      vector tagl3(1400),tagr3(1400)
      vector tagl4(1400),tagr4(1400)
      vector tagl5(1400),tagr5(1400)
      vector tagl6(1400),tagr6(1400)
      vector tagl7(1400),tagr7(1400)
      vector tagl8(1400),tagr8(1400)
      vector tagl9(1400),tagr9(1400)
      vector tagl10(1400),tagr10(1400)
      vector tagl11(1400),tagr11(1400)
      vector tagl12(1400),tagr12(1400)
      vector tagl13(1400),tagr13(1400)
      vector tagl14(1400),tagr14(1400)
      vector tagl15(1400),tagr15(1400)
      vector tagl16(1400),tagr16(1400)
      vector tagl17(1400),tagr17(1400)
      vector tagl18(1400),tagr18(1400)
      open(unit=80,file='tagl.dat',status='unknown')
      do r=1,1400
        all=tagl0(r)+tagl1(r)+tagl2(r)+tagl3(r)+tagl4(r)+tagl5(r)
     +     +tagl6(r)+tagl7(r)+tagl8(r)+tagl9(r)+tagl10(r)+tagl11(r)
     +     +tagl12(r)+tagl13(r)+tagl14(r)+tagl5(r)+tagl16(r)
     +     +tagl17(r)+tagl18(r)
        if (all.gt.0) then
          write(80,1000) runs(r)
     +     ,tagl0(r),tagl1(r),tagl2(r),tagl3(r),tagl4(r),tagl5(r)
     +     ,tagl6(r),tagl7(r),tagl8(r),tagl9(r),tagl10(r),tagl11(r)
     +     ,tagl12(r),tagl13(r),tagl14(r),tagl15(r),tagl16(r) 
     +     ,tagl17(r),tagl18(r)
        endif
      enddo
      close(unit=80)
      open(unit=80,file='tagr.dat',status='unknown')
      do r=1,1400
        all=tagr0(r)+tagr1(r)+tagr2(r)+tagr3(r)+tagr4(r)+tagr5(r)
     +     +tagr6(r)+tagr7(r)+tagr8(r)+tagr9(r)+tagr10(r)+tagr11(r)
     +     +tagr12(r)+tagr13(r)+tagr14(r)+tagr15(r)+tagr16(r)
     +     +tagr17(r)+tagr18(r)
        if (all.gt.0) then
          write(80,1000) runs(r)
     +     ,tagr0(r),tagr1(r),tagr2(r),tagr3(r),tagr4(r),tagr5(r)
     +     ,tagr6(r),tagr7(r),tagr8(r),tagr9(r),tagr10(r),tagr11(r)
     +     ,tagr12(r),tagr13(r),tagr14(r),tagr15(r),tagr16(r)
     +     ,tagr17(r),tagr18(r)
        endif
      enddo
      close(unit=80)
 1000 format(f5.0,19e12.4)
      end
