anchor.diff:            write(*,*) '!! Error: No output file specified'
             call usage('!! Use -o OFILE to specify LOS output file')
         endif
  -      cosaz = dcos(az*d2r)
  -      sinaz = dsin(az*d2r)
  -      cosinc = dcos(incl*d2r)
  -      sininc = dsin(incl*d2r)
  -      !print *,'AZ',az
  -      !print *,'INCL',incl
  -      !print *,'IFILE ',ifile 
  -      !print *,'OFILE ',ofile
   
   C----
   C Control files
  
positive.code: 
  C======================================================================C
  
        SUBROUTINE gcmdln(az,incl,ifile,ofile)
        IMPLICIT none
        REAL*8 az,incl
        CHARACTER*40 tag,ifile,ofile
        INTEGER i,narg
        az = -99999.0d0
        incl = -99999.0d0
        ifile = 'stdin'
        ofile = 'stdout'
        narg = iargc()
        if (narg.eq.0) then
            call usage('')
  
negative.code:       REAL*8 uLOS,stlo,stla,stdp,uN,uE,uZ
        REAL*8 az,incl,cosaz,cosinc,sinaz,sininc
        CHARACTER*40 ifile,ofile
        CHARACTER*256 azincfile
        LOGICAL ex
        INTEGER uin,uout
  
  C----
  C Parse command line
  C----
        call gcmdln(az,incl,ifile,ofile,azincfile)
        if ((az.lt.-1000.0d0.or.incl.lt.-1000.0d0)
       1                                .and.azincfile.eq.'none') then
            write(*,*) '!! Error: azimuth or inclination are undefined'
            call usage('!! Use -a AZ, -i INCL, or -azinc FILE')
        endif
        if (ifile.eq.'none') then
            write(*,*) '!! Error: Input displacement vector file ',
  