anchor.diff:        REAL*8 evlo(FMAX),evla(FMAX),evdp(FMAX),str(FMAX),dip(FMAX),
        1       rak(FMAX),dx(FMAX),dy(FMAX),slip(FMAX)
         REAL*8 uN,uE,uZ,strain(3,3),stress(3,3),norml,shear,coul
  +      REAL*8 az,hdsp
         INTEGER kffm,kflt,kmag,ksta,khaf,ktrg
         INTEGER kdsp,kstn,ksts,knor,kshr,kcou,kgmt
         COMMON /ICHECK/ kffm,kflt,kmag,ksta,khaf,ktrg
         COMMON /OCHECK/ kdsp,kstn,ksts,knor,kshr,kcou,kgmt
   C     Open files specified for output
  -      if (kdsp.eq.1) open(unit=21,file=dspf,status='unknown')
  +      if (kdsp.ne.0) open(unit=21,file=dspf,status='unknown')
         if (kstn.eq.1) open(unit=22,file=stnf,status='unknown')
         if (ksts.eq.1) open(unit=23,file=stsf,status='unknown')
         if (knor.eq.1) open(unit=24,file=norf,status='unknown')
  
positive.code:           write(*,*)
        endif
        write(*,*)
       1 '-strain STRNFILE        Strain matrix (EE NN ZZ EN EZ NZ)'
        if (str.eq.'long') then
            write(*,*)
  
negative.code:               read(13,*) trgstr,trgdip,trgrak,frict
            endif
  C         Compute displacements
            if (kdsp.ne.0) then
                call calcdisp(uN,uE,uZ,stlo,stla,stdp,nflt,evlo,evla,evdp,
       1                      str,dip,rak,dx,dy,slip,vp,vs,dens,flttyp,xy)
                if (long.eq.0.and.kdsp.eq.1) then
                    write(21,9990) stlo,stla,stdp*1d-3,uE,uN,uZ
                elseif (long.eq.1.and.kdsp.eq.1) then
                    write(21,9993) stlo,stla,stdp*1d-3,uE,uN,uZ
                elseif (kdsp.eq.2) then
                    az = atan2(uE,uN)*r2d
                    hdsp = dsqrt(uE*uE+uN*uN)
                    write(21,9990) stlo,stla,stdp*1d-3,az,hdsp,uz
                endif
            endif
  C         Compute (3x3) strain matrix
  