anchor.diff:        INTEGER flttyp
         REAL*8 vp,vs,dens
         INTEGER i,j
  -C----
  -C Compute NEZ displacements at (stlo,stla,stdp) from FFM
  -C----
  -      do 112 i = 1,3
  -          do 111 j = 1,3
  +      do 222 i = 1,3
  +          do 221 j = 1,3
                 strain(i,j) = 0.0d0
  -  111     continue
  -  112 continue 
  -      do 115 f = 1,nflt
  +  221     continue
  +  222 continue 
  +      do 225 f = 1,nflt
             call ddistaz(dist,az,evlo(f),evla(f),stlo,stla)
             dist = dist*6.371d6
             x = dist*( dcos(az-d2r*str(f)))
  
positive.code:           uNnet = uNnet + uN
            uEnet = uEnet + uE
            uZnet = uZnet + uz
    102 continue
        RETURN
        END
  
  C----------------------------------------------------------------------C
  
        SUBROUTINE xy2NE(uN,uE,ux,uy,str)
        IMPLICIT none
        REAL*8 uN,uE,ux,uy,str,theta,uhor
        REAL*8 pi,d2r
        PARAMETER (pi=4.0d0*datan(1.0d0),d2r=pi/1.8d2)
  
negative.code:           read (dyc,*) dyr
            dxr = 1.0d3*dxr
            dyr = 1.0d3*dyr
            read (31,*) du,du,du,du,du,du,du,du,du,du,hylo,du,hyla
            do 311 i=1,7
                read (31,*) du
    311     continue
            do 312 i = 1,nx*ny
                read (31,*) evla(ct+i),evlo(ct+i),evdp(ct+i),slip(ct+i),
       1                    rak(ct+i),str(ct+i),dip(ct+i)
                slip(ct+i) = 1.0d-2*slip(ct+i)
                dx(ct+i) = dxr
                dy(ct+i) = dyr
                evdp(ct+i) = 1.0d3*evdp(ct+i)
    312     continue
            ct = ct + nx*ny
    313 continue
        nflt = nflt + ct
        close(31)
        RETURN
  