anchor.diff:  
   C----------------------------------------------------------------------C
   
  -      SUBROUTINE readin(obsf,nobs,fltf,nflt,dimen,obs,flt)
  +      SUBROUTINE readobs(obs,nobs,OBSMAX,obsf)
   C----
   C Read displacement observations from file
   C----
         IMPLICIT none
  -      CHARACTER*80 obsf,fltf
  -      INTEGER nobs,nflt,dimen,i,j
  -      INTEGER OBSMAX,FLTMAX
  -      PARAMETER (OBSMAX=2500,FLTMAX=2000)
  -      REAL*8 obs(OBSMAX,6),flt(FLTMAX,7)
  -C Count number of observations
  +      CHARACTER*80 obsf
  +      INTEGER nobs,OBSMAX,i,j
  +      REAL*8 obs(OBSMAX,6)
  +C Read in observation locations and displacement vectors
         call linect(nobs,obsf)
  -C Read observation locations and vector components
  +      if (nobs.gt.OBSMAX) call usage('!! Error: too many input data')
         open(unit=21,file=obsf,status='old')
  -      do 101 i = 1,nobs
  -          if (dimen.eq.2) then
  -              ! 2D: y(m) z(m) uy(m) uz(m)
  -              read(21,*) (obs(i,j),j=1,4)
  -          elseif (dimen.eq.3) then
  -              ! 3D: x(m) y(m) z(m) ux(m) uy(m) uz(m)
  -              read(21,*) (obs(i,j),j=1,6)
  -          endif
  -  101 continue
  +      do 201 i = 1,nobs
  +          read(21,*) (obs(i,j),j=1,6) ! x y z ux uy uz (all meters)
  +  201 continue
         close(21)
  -C Count number of faults in model
  +      RETURN
  +      END
  +
  +C----------------------------------------------------------------------C
  +
  +      SUBROUTINE readflt(flt,nflt,FLTMAX,fltf)
  +C----
  +C Read model fault parameters from file
  +C----
  +      IMPLICIT none
  +      CHARACTER*80 fltf
  +      INTEGER nflt,FLTMAX,i,j
  +      REAL*8 flt(FLTMAX,7)
  +C Read model fault parameters and orientations
         call linect(nflt,fltf)
  -C Read fault locations and kinematics
  +      if (nflt.gt.FLTMAX) call usage('!! Error: too many model faults')
         open(unit=22,file=fltf,status='old')
  -      do 102 i = 1,nflt
  -          if (dimen.eq.2) then
  -              ! 2D: y(m) z(m) dip(deg) wid(m) len(m)
  -              read(22,*) (flt(i,j),j=1,5)
  -          elseif (dimen.eq.3) then
  -              ! 3D: x(m) y(m) z(m) str(deg) dip(deg) wid(m) len(m)
  -              read(22,*) (flt(i,j),j=1,7)
  -          endif
  -  102 continue
  +      do 202 i = 1,nflt
  +          read(22,*) (flt(i,j),j=1,7) ! x y z str dip wid len (m,deg)
  +  202 continue
         close(22)
         RETURN
         END
   
   C----------------------------------------------------------------------C
   
  -      SUBROUTINE readhaf(haff,haf)
  +      SUBROUTINE readhaf(haf,haff)
         IMPLICIT none
         CHARACTER*80 haff
         REAL*8 haf(3),lamda,mu
  
positive.code:           elseif (tag(1:2).eq.'-p') then
                p = 1
            else
                call usage('!! Error: No option '//tag)
            endif
            goto 901
    902 continue
        RETURN
        END
  
  
negative.code:           write(*,*)
        endif
        write(*,*)
       1 'Usage: fltinv -obs OBSFILE -flt FLTFILE -o OFILE [-p]'
        write(*,*)
       1 '              [-geo] [-smooth CONST FILE] [-damp CONST]'
        write(*,*)
       1 '              [-haf HAFSPC] [-anneal [ANEALFILE]] [-h|-d]'
        write(*,*)
        write(*,*)
       1 '-obs OBSFILE        Displacement observations'
        if (d.eq.1) then
            write(*,*)
       1 '                       x(m) y(m) z(m) ux(m) uy(m) uz(m)'
            write(*,*)
        endif
        write(*,*)
       1 '-flt FLTFILE        Input fault location and geometry'
        if (d.eq.1) then
            write(*,*)
       1 '                       x(m) y(m) z(m) str(deg) dip(deg) ',
       2                         'wid(m) len(m)'
            write(*,*)
        endif
  