anchor.diff:          lo_nx = size(lo%lat,1)
           lo_ny = size(lo%lat,2)
   
  -        allocate(lo%geolut%x(4,nx,ny))
  -        allocate(lo%geolut%y(4,nx,ny))
  -        allocate(lo%geolut%w(4,nx,ny))
  +        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=1,ny
  +        do j=jms,jme
               curpos%x = 1
  +
               ! use a brute force approach to find a starting
  -            lastpos  = find_location(lo, hi%lat(1,j), hi%lon(1,j), curpos)
  -            if (lastpos%x<1) then
  +            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 = j
  -                write(*,*) "Error in Geographic interpolation, check input lat / lon grids", 1,j
  -            endif
  -
  -            do i=1, nx
  +                ! 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
  
positive.code:     !!  loops over y,z,x but geolut is only defined over x,y (for now)
      !!
      !!------------------------------------------------------------
      subroutine geo_interp(fieldout,fieldin,geolut,boundary_only)
          implicit none
          real,intent(inout)::fieldout(:,:,:)
          real,intent(in)::fieldin(:,:,:)
          type(geo_look_up_table),intent(in)::geolut
          logical,intent(in)::boundary_only
          integer::nx,nz,ny
          integer:: i,j,k,l,localx,localy
          real::localw
          real :: local_center
  
          nx=size(fieldout,1)
          nz=size(fieldout,2)
          ny=size(fieldout,3)
  
          ! if we are only processing the boundary, then make x and y increments be the size of the array
          ! so we only hit the edges of the array
          if (boundary_only) then
              call boundary_interpolate(fieldout, fieldin, geolut)
          else
          ! use the geographic lookup table generated earlier to
          ! compute a bilinear interpolation from lo to hi
          ! if we are doing the interior too, just iterate over all x and y
              do k=1,ny
                  do j=1,nz
                      do i=1,nx
                          fieldout(i,j,k)=0
                          local_center = 0
                          do l=1,4
                              localx=geolut%x(l,i,k)
                              localy=geolut%y(l,i,k)
                              local_center = local_center + fieldin(localx,j,localy)
                              if (l < 3) then
                                  localw=geolut%w(l,i,k)
                                  fieldout(i,j,k) = fieldout(i,j,k) + fieldin(localx,j,localy) * localw
                              endif
                          enddo
                          localw = geolut%w(3,i,k)
                          fieldout(i,j,k) = fieldout(i,j,k) + local_center/4 * localw
                          ! do l=1,4
                          !     localx=geolut%x(l,i,k)
                          !     localy=geolut%y(l,i,k)
  
negative.code:             enddo
          enddo
          ! then loop over all y elements on the x ends
          do k=kms,kme
              do j=jms,jme
                  do i=ims,ime,nx-1
                      fieldout(i,j,k)=0
                      local_center = 0
                      do l=1,4
  