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:           write(*,*)
        endif
        write(*,*)
       1 'Usage: vec2los -a AZ -i INC [-f IFILE] [-o OFILE] [-h]'
        write(*,*)
        write(*,*)
       1 '-a AZ     Look azimuth (CW from N)'
        write(*,*)
       1 '-i INC    Look inclination (from horizontal=0 to vertical=90)'
        write(*,*)
       1 '-f IFILE  Input vector displacement file (default: stdin)',
       2            ' (stlo stla stdp uE uN uZ)'
  
negative.code: C----
  C Convert NEZ to LOS
  C----
        cosaz = 0.0d0
        sinaz = 0.0d0
        cosinc = 0.0d0
        sininc = 0.0d0
        if (azincfile.ne.'none') then
            open(unit=11,file=azincfile,status='old')
        else
            cosaz = dcos(az*d2r)
            sinaz = dsin(az*d2r)
            cosinc = dcos(incl*d2r)
            sininc = dsin(incl*d2r)
        endif
        !print *,'AZ',az
        !print *,'INCL',incl
        !print *,'IFILE ',ifile 
        !print *,'OFILE ',ofile
     11 read (uin,*,end=12) stlo,stla,stdp,uE,uN,uZ
            if (azincfile.ne.'none') then
                read(11,*) az,incl
                cosaz = dcos(az*d2r)
                sinaz = dsin(az*d2r)
                cosinc = dcos(incl*d2r)
                sininc = dsin(incl*d2r)
            endif
            uLOS = uN*cosaz*cosinc
       1             + uE*sinaz*cosinc
       2                 - uZ*sininc
  