anchor.diff:                read(tag,'(BN,F10.0)') smooth
                 i = i + 1
                 call getarg(i,smoof)
  +          elseif (tag(1:6).eq.'-debug') then
  +              dbg = 1
             elseif (tag(1:5).eq.'-damp') then
                 i = i + 1
                 call getarg(i,tag)
  
positive.code: 
  C----------------------------------------------------------------------C
  
        SUBROUTINE gcmdln(fltf,obsf,smooth,smoof,damp,dimen,ofile,geo)
        IMPLICIT NONE
        CHARACTER*80 fltf,obsf,tag,smoof,ofile
        INTEGER i,narg
        REAL*8 smooth,damp
        INTEGER dimen,geo
        fltf = 'none'
        obsf = 'none'
        smoof = 'none'
        ofile = 'none'
        dimen = 0
        smooth = -1.0d0
        damp = -1.0d0
        geo = 0
        narg = iargc()
        if (narg.eq.0) call usage('!! Error: no command line arguments')
        i = 0
  
negative.code:           if (.not.ex) call usage('!! Error: no input file: '//obsf)
        endif
  C Problem dimension
        if (dimen.ne.2.and.dimen.ne.3) then
            write(*,*) '!! Error: Problem dimension must be 2 or 3'
            call usage('!! Use -2 for 2D, -3 for 3D')
        endif
        RETURN
        END
  
  C----------------------------------------------------------------------C
  
        SUBROUTINE chkout(ofile,p)
  C----
  C Check that output files defined
  C----
        IMPLICIT none
        CHARACTER*80 ofile
        INTEGER p
  C Output file
        if (ofile.eq.'none'.and.p.eq.0) then
            write(*,*) '!! Error: Output file not specified'
            call usage('!! Use -o OFILE to define output file or -p')
        endif
        RETURN
        END
  
  C----------------------------------------------------------------------C
  
        SUBROUTINE readin(obsf,nobs,fltf,nflt,dimen,obs,flt)
  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
        call linect(nobs,obsf)
  C Read observation locations and vector components
        open(unit=21,file=obsf,status='old')
        do 101 i = 1,nobs
            if (dimen.eq.2) then
  