anchor.diff:        IMPLICIT NONE
         INTEGER STER
         PARAMETER (STER=0)
  -      CHARACTER*40 fltfile,stafile,haffile,dspfile
  +      CHARACTER*40 fltfile,mtfile,stafile,haffile,dspfile,gmtfile
         LOGICAL ex
  -      INTEGER auto
  +      INTEGER auto,mt,gmt
         INTEGER nflt,FMAX
         PARAMETER (FMAX=1500)
  -      INTEGER flttyp(FMAX)
  +      INTEGER flttyp
         REAL*8 evlo(FMAX),evla(FMAX),evdp(FMAX),str(FMAX),dip(FMAX),
        1       rak(FMAX),slip(FMAX),dx(FMAX),dy(FMAX),area(FMAX)
         REAL*8 stlo,stla,stdp
  
positive.code:       PARAMETER (FMAX=1500)
        REAL*8 evlo(FMAX),evla(FMAX),evdp(FMAX),str(FMAX),dip(FMAX),
       1       rak(FMAX),slip(FMAX),area(FMAX),dx(FMAX),dy(FMAX)
        INTEGER flttyp(FMAX)
        REAL*8 vp,vs,dens
  
        uNnet = 0.0d0
  
negative.code:           else
                open (unit=23,file=haffile,status='old')
                read (23,*) vp,vs,dens
                close(23)
            endif
            inquire(file=stafile,exist=ex)
            if (.not.ex) call usage('!! Error: no file named '//stafile)
            open(unit=22,file=stafile,status='old')
        elseif (auto.eq.1) then
            call sethafdef(vp,vs,dens)
            call autogrid(stafile,nflt,evlo,evla,evdp,str,
       1                  dip,rak,dx,dy,area,slip,vp,vs,dens,flttyp)
            open (unit=22,file=stafile,status='old')
        endif
  
  