anchor.diff:            write(6,*) 'read harm transform coords u ',minval(u%data(1)),minval(u%data(2))
             write(6,*) 'read harm transform coords u size ',size(u),hslope
   !          if(BL.eq.3) then
  -! HARD-CODED MMKS OR MKS
  -          uks = ummks2uks(u,dble(x1_arr),dble(x2_arr))
  -          bks = ummks2uks(b,dble(x1_arr),dble(x2_arr))
  -!          else
  -!          uks = umksh2uks(u,r_arr,x2_arr)
  -!          bks = umksh2uks(b,r_arr,x2_arr)
  -!          end if
  +          if(IS_MMKS.eq.1) then
  +             uks = ummks2uks(u,dble(x1_arr),dble(x2_arr))
  +             bks = ummks2uks(b,dble(x1_arr),dble(x2_arr))
  +          else
  +             uks = umksh2uks(u,r_arr,x2_arr)
  +             bks = umksh2uks(b,r_arr,x2_arr)
  +          end if
             write(6,*) 'after uks ',minval(uks%data(1))
             u = uks2ubl(uks,dble(r_arr),dble(asim))
             write(6,*) 'read harm transform coords b', minval(u%data(3)),maxval(u%data(2)),&
  
positive.code:         endwhere
  !        write(6,*) 'iharm vals transform'
  !        if(BL.eq.3) then
  ! FOR NOW HARD CODING MKS or MMKS
          call transformbl2mmks(zr,theta,zphi,x1,x2,x3)
  !        call transformbl2mksh(zr,theta,zphi,x1,x2,x3)
  !        write(6,*) 'transform r: ',maxval(zr), minval(zr), maxval(x1), minval(x1)
  !        write(6,*) 'transform th: ',maxval(theta), minval(theta), minval(x2), maxval(x2)
  !        write(6,*) 'transform phi: ',maxval(zphi), minval(zphi), minval(x3), maxval(x3)
  
negative.code:           poly_alpha=header(10)
            startx1=header(11)
            metric=header(12)
  ! flag for MMKS: metric=0 for MKS, metric=1 for MMKS (=FMKS)
            IS_MMKS=metric
            eHEAT=header(13)
            eRAD=header(14)
            n_prim=header(15)
  