anchor.diff:          nx=size(fieldout,1)
           nz=size(fieldout,2)
           ny=size(fieldout,3)
  +
  +        ims = lbound(fieldout,1)
  +        ime = ubound(fieldout,1)
  +        jms = lbound(fieldout,2)
  +        jme = ubound(fieldout,2)
  +        kms = lbound(fieldout,3)
  +        kme = ubound(fieldout,3)
  +
           ! use the geographic lookup table generated earlier to
           ! compute a bilinear interpolation from lo to hi
           ! first loop over all x elements on the y ends
  -        do k=1,ny,ny-1
  -            do j=1,nz
  -                do i=1,nx
  +        do k=kms,kme,ny-1
  +            do j=jms,jme
  +                do i=ims,ime
                       fieldout(i,j,k)=0
                       local_center = 0
                       do l=1,4
  
positive.code:         enddo
          ! because one or both steps could actually be 1...
          ! this is deliberate so we can find the edge of the array if necessary
          xc = max(1, min(nx, xc+xstep ) )
          yc = max(1, min(ny, yc+ystep ) )
  
          ! CASE 2 use a log(n search)
          ! in case we hit some pathologically varying dx case
  
negative.code:         lo_nx = size(lo%lat,1)
          lo_ny = size(lo%lat,2)
  
          ims = lbound(hi%lat,1)
          ime = ubound(hi%lat,1)
          jms = lbound(hi%lat,2)
          jme = ubound(hi%lat,2)
  
          allocate(lo%geolut%x(4,ims:ime, jms:jme))
          allocate(lo%geolut%y(4,ims:ime, jms:jme))
          allocate(lo%geolut%w(4,ims:ime, jms:jme))
  
          curpos%x = 1
          curpos%y = 1
  
          do j=jms,jme
              curpos%x = 1
  
              ! use a brute force approach to find a starting
              lastpos  = find_location(lo, hi%lat(ims,j), hi%lon(ims,j), curpos)
              if (lastpos%x < 1) then
                  ! something broke, try assuming that the grids are the same
                  ! should put in some check here to make sure this doesn't happen in a real case
                  ! lastpos%x = 1
                  ! lastpos%y = 1
                  write(*,*) "Error in Geographic interpolation, check input lat / lon grids", ims,j
                  stop
              endif
  
              do i=ims, ime
                  curpos = find_location(lo, hi%lat(i,j), hi%lon(i,j), lastpos)
  
                  if (curpos%x<1) then
  