anchor.diff:  !          write(6,*) 'after read loop'
                close(unit=8)
                deallocate(data)
  -          else
  +          elseif(binary.eq.1) then 
                write(6,*) 'harmpi data size: ',dlen,nx1,nx2,nx3
                write(6,*) 'harmpi data file: ',data_file
                allocate(data(dlen,nx1*nx2*nx3))
  
positive.code:         x1=log(r)
          x3=phi
  !        x2=th/pi
          hval=1d0
          args=(/th(1),hval/)
          do i=1,size(r)
             args(1)=th(i)
             x2(i)=zbrent(findx2harmpi,-1d0,1d0,dble(args),1d-6)
          enddo
          end subroutine transformbl2mksh
  
          function umksh2uks(fum,r,x2,hin) result(uks)
            ! Converts a Kerr-Schild spherical 4-velocity to a Boyer-Lindquist one.
  
negative.code:           allocate(uks(nx1*nx2*nx3)); allocate(bks(nx1*nx2*nx3))
            pmin=1e-18
            write(6,*) 'data file: ',data_file
            if(BINARY.eq.0) then
               open(unit=8,file=data_file,form='formatted',status='old',action='read')
               allocate(data(dlen,nx3)); nelem=nx3
               write(6,*) 'read harm sizes', dlen, nx2, size(data)
  