anchor.diff:                typ = 1 ! Strike-slip fault (otherwise)
             endif
             call wellscoppersmith(wid,len,mag,typ)
  +          !wid = wid*fltfac
  +          !len = len*fltfac
             slip(i) = ((1.0d1**(1.5d0*(mag+10.7d0)))*1.0d-7)/
        1                                            (mu*wid*len*1.0d6)
             dx(i) = len*1.0d3
  
positive.code: 
        SUBROUTINE calcdefm(staf,trgf,nsta,ntrg,nflt,evlo,evla,evdp,str,
       1                    dip,rak,dx,dy,slip,flttyp,vp,vs,dens,dspf,
       2                    stnf,stsf,norf,shrf,coulf,xy,prog,long,noz)
  C----
  C Compute displacements, strains, and stresses from shear dislocations.
  C----
  
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) 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)
                endif
            endif
  C         Compute (3x3) stress matrix
            if (ksts.ge.1) then
                call stn2sts(stress,strain,vp,vs,dens)
                if (ksts.eq.1) 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.3) then
                    write(23,9991) stlo,stla,stdp*1d-3,estrs(stress)
                endif
            endif
  C         Resolve stresses onto target fault planes
            if (kshr.ge.1.or.knor.eq.1.or.kcou.eq.1) then
                call coulomb(coul,norml,shear,stress,trgstr,trgdip,trgrak,
       1                     frict)
                if (kshr.ge.1) then
                    write(25,9992) stlo,stla,stdp*1d-3,shear
                endif
                if (knor.eq.1) then
                    write(24,9992) stlo,stla,stdp*1d-3,norml
                endif
                if (kcou.eq.1) then
                    write(26,9992) stlo,stla,stdp*1d-3,coul
                endif
            endif
  C         Update progress indicator
  