anchor.diff:        IMPLICIT none
   C Command line inputs
         CHARACTER*80 fltf,obsf,smoof,haff,ofile,annf
  -      REAL*8 smooth,damp
  -      INTEGER geo,p,invert,vrb,ostyle
  +      REAL*8 smooth,damp,damp0
  +      INTEGER geo,p,invert,vrb,ostyle,misfit
   C Inversion array variables
         INTEGER nobs,OBSMAX,nflt,FLTMAX
         PARAMETER (OBSMAX=500,FLTMAX=500)
         REAL*8 obs(OBSMAX,6),flt(FLTMAX,7),gf(OBSMAX,FLTMAX,6)
         REAL*8 soln(FLTMAX,2)
  +      REAL*8 pre(OBSMAX,3),tot
   C Other variables
         REAL*8 haf(3)
         INTEGER i,j,k
  
positive.code: C----------------------------------------------------------------------C
  
        SUBROUTINE gcmdln(fltf,obsf,smoof,smooth,damp,ofile,p,geo,haff,
       1                  invert,annf,ostyle)
        IMPLICIT NONE
        CHARACTER*80 fltf,obsf,tag,smoof,ofile,haff,annf
        INTEGER i,narg,indx
        REAL*8 smooth,damp
        INTEGER geo,p,invert,vrb,ostyle
        COMMON /VERBOSE/ vrb
        fltf = 'none'
        obsf = 'none'
  
negative.code:       endif
  
  C----
  C Get best damping parameter
  C----
  C      call getdamp(soln,gf,obs,nobs,OBSMAX,nflt,FLTMAX,damp0,smooth,
  C     1             smoof)
  
  C----
  C Run inversion
  C----
        if (invert.eq.0) then
  