       program taper
       data pi/3.14159265/
      OPEN(UNIT=17,FILE='taper.out',FORM='FORMATTED',STATUS='UNKNOWN')
      a0 = 0.005625   !   R1**2
      a1 = 0.0        !   dBz/ds   at s =0
       a2=0.001137    !    for L = 12.2m
       a3=-0.00006215 !    for L = 12.2m
      s = -0.01
      flux = 0.34106   !  B=19.3T * pi * R1**2=.075m**2
      do 30 j=1,1230
       s = s + 0.01
       fac = a0+a1*s+a2*s**2+a3*s**3
       rz = sqrt(fac)
       bz = flux/(pi*fac)
       snew = s 
       if(j.gt.1220) bz = 1.750
       if(j.gt.1220) rz = 0.250
       write(17,884)  j,snew,rz,bz
  884  format(i4,3f12.6)
  30   continue
       goto 16
   16  continue
       close(17)
       stop
       end
