anchor.diff:        REAL*8 olon,olat,ilon,ilat,plon,plat,angle
         REAL*8 ix,iy,iz,px,py,pz,ox,oy,oz
         REAL*8 pi,d2r,r2d
  -      PARAMETER (pi=4.0d0*atan(1.0d0),d2r=pi/1.8d2,r2d=1.8d2/pi)
  +      PARAMETER (pi=4.0d0*datan(1.0d0),d2r=pi/1.8d2,r2d=1.8d2/pi)
   
         call lonlat2xyz(ix,iy,iz,ilon,ilat)
         call lonlat2xyz(px,py,pz,plon,plat)
   
  -      ox = px*(px*ix+py*iy+pz*iz)*(1-cos(angle*d2r))
  -     1         + ix*cos(angle*d2r)
  -     2         + (-pz*iy+py*iz)*sin(angle*d2r)
  -      oy = py*(px*ix+py*iy+pz*iz)*(1-cos(angle*d2r))
  -     1         + iy*cos(angle*d2r)
  -     2         + ( pz*ix-px*iz)*sin(angle*d2r)
  -      oz = pz*(px*ix+py*iy+pz*iz)*(1-cos(angle*d2r))
  -     1         + iz*cos(angle*d2r)
  -     2         + (-py*ix+px*iy)*sin(angle*d2r)
  +      ox = px*(px*ix+py*iy+pz*iz)*(1.0d0-dcos(angle*d2r))
  +     1         + ix*dcos(angle*d2r)
  +     2         + (-pz*iy+py*iz)*dsin(angle*d2r)
  +      oy = py*(px*ix+py*iy+pz*iz)*(1.0d0-dcos(angle*d2r))
  +     1         + iy*dcos(angle*d2r)
  +     2         + ( pz*ix-px*iz)*dsin(angle*d2r)
  +      oz = pz*(px*ix+py*iy+pz*iz)*(1.0d0-dcos(angle*d2r))
  +     1         + iz*dcos(angle*d2r)
  +     2         + (-py*ix+px*iy)*dsin(angle*d2r)
   
  -      olon = atan2(oy,ox)*r2d
  -      olat = asin(oz)*r2d
  +      olon = datan2(oy,ox)*r2d
  +      olat = dasin(oz)*r2d
   
         RETURN
         END
  
positive.code:           elseif (tag(1:2).eq.'-o') then
                i = i + 1
                call getarg(i,ofile)
            elseif (tag(1:2).eq.'-h'.or.tag(1:2).eq.'-?') then
                call usage()
            endif
  
negative.code:       IMPLICIT none
  
        write(*,*)
       1 'Usage: sphfinrot -f [IFILE] -o [OFILE] -d -u -h/-?'
        write(*,*)
       1 '  -f [IFILE] (Default sphfinrot.in) name of input file'
        write(*,*)
       1 '  -o [OFILE] (Default sphfinrot.out) name of output file'
        write(*,*)
       1 '  -d         Run with default file names'
        write (*,*)
       1 '  -u         Prompt user to enter information through standard'
        write (*,*)
       1 '                 input for single calculation'
        write (*,*)
       1 '  -h/-?      Online help (this screen)'
        write (*,*) ''
        write (*,*)
       1 '  sphfinrot makes a counter-clockwise finite rotation of a',
       2     ' point around a pole'
        write (*,*) ''
        write (*,*)
       1 '    Input file'
        write (*,*)
       1 '        lon_init lat_init pole_lon pole_lat angle'
        write (*,*)
       1 '         :  :'
        write(*,*) ''
        write (*,*)
       1 '    Output file'
        write (*,*)
       1 '        lon_final lat_final'
        write (*,*)
  