anchor.diff:        CHARACTER*40 staf,trgf,dspf,stnf,stsf,norf,shrf,coulf
         INTEGER i,nsta,ntrg,progout
         REAL*8 stlo,stla,stdp,trgstr,trgdip,trgrak,frict,vp,vs,dens
  -      INTEGER nflt,FMAX,flttyp,xy,prog,long
  +      INTEGER nflt,FMAX,flttyp,xy,prog,long,noz
         PARAMETER (FMAX=1500)
         REAL*8 evlo(FMAX),evla(FMAX),evdp(FMAX),str(FMAX),dip(FMAX),
        1       rak(FMAX),dx(FMAX),dy(FMAX),slip(FMAX)
  
positive.code:       incr = 1.0d99
        adist = 1.0d99
        long = 0
  C Input file status indicators (ICHECK block)
  C 0=unspecified; 1=specified; -1=specified, but file not found
        kffm = 0
  
negative.code:               call calcstn(strain,stlo,stla,stdp,nflt,
       1                     evlo,evla,evdp,str,dip,rak,dx,dy,slip,
       2                     vp,vs,dens,flttyp,xy)
                if (kstn.eq.1.and.noz.eq.0) then
                    write(22,9991) stlo,stla,stdp*1d-3,
       1                           strain(1,1),strain(2,2),strain(3,3),
       2                           strain(1,2),strain(1,3),strain(2,3)
                elseif(kstn.eq.1.and.noz.eq.1) then
                    write(22,*) stlo,stla,
       1                           strain(1,1),strain(2,2),strain(3,3),
       2                           strain(1,2),strain(1,3),strain(2,3)
                endif
            endif
  C         Compute (3x3) stress matrix
            if (ksts.ge.1) then
                call stn2sts(stress,strain,vp,vs,dens)
                if (ksts.eq.1.and.noz.eq.0) then
                    write(23,9991) stlo,stla,stdp*1d-3,
       1                           stress(1,1),stress(2,2),stress(3,3),
       2                           stress(1,2),stress(1,3),stress(2,3)
                elseif (ksts.eq.1.and.noz.eq.1) then
                    write(23,*) stlo,stla,
       1                           stress(1,1),stress(2,2),stress(3,3),
       2                           stress(1,2),stress(1,3),stress(2,3)
                endif
  