anchor.diff:            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)
  -C          call autogrid(stafile,nflt,hypolon,hypolat,evlo,evla,evdp,str,
  -C     1                  dip,rak,dx,dy,area,slip,vp,vs,dens,flttyp)
  +          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
   
  
positive.code:       RETURN
        END
  
  C----------------------------------------------------------------------C
  
        SUBROUTINE gcmdln(fltfile,stafile,haffile,dspfile,auto)
        IMPLICIT none
        CHARACTER*40 tag
        INTEGER narg,i
        CHARACTER*40 fltfile,stafile,haffile,dspfile
        INTEGER auto
  
        fltfile = 'faults.txt'
        stafile = 'stations.txt'
        haffile = 'structure.txt'
        dspfile = 'disp.out'
        auto = 0
  
        narg = iargc()
        i = 0
  
negative.code:           call calcdisp(uNnet,uEnet,uZnet,stlo,stla,stdp,nflt,
       1                  evlo,evla,evdp,str,dip,rak,dx,dy,area,slip,
       2                  vp,vs,dens,flttyp)
            write (11,9999) stlo,stla,uEnet,uNnet,uZnet
            prog = prog + 1
            call progbar(prog,prog100,progtag)
            goto 101
    103 continue
   9999 format (2F12.4,X,3F12.4)
  
        if (gmt.eq.1) call makegmtfile(gmtfile,nflt,evlo,evla,str,dip,dx,
       1                               dy,slip)
  
        END
  
  C======================================================================C
  
        SUBROUTINE readfaults(fltfile,nflt,evlo,evla,evdp,str,dip,rak,
       1                      slip,dy,dx,area)
  
        IMPLICIT none
        CHARACTER*40 fltfile
  