anchor.diff:                  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)
  -                            localw=geolut%w(l,i,k)
  -                            fieldout(i,j,k)=fieldout(i,j,k)+fieldin(localx,j,localy)*localw
  +                            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)
  +                        !     localw=geolut%w(l,i,k)
  +                        !     fieldout(i,j,k)=fieldout(i,j,k)+fieldin(localx,j,localy)*localw
  +                        ! enddo
                       enddo
                   enddo
               enddo
  
positive.code:         integer::nx,nz,ny
          integer:: i,j,k,l,localx,localy
          real::localw
  
          nx=size(fieldout,1)
          nz=size(fieldout,2)
  
negative.code:                         lon(k) = lo%lon(xy%x(k), xy%y(k))
                      enddo
                      ! and calculate the weights to apply to each gridcell
                      lo%geolut%w(:,i,j) = tri_weights(hi%lat(i,j), lat, hi%lon(i,j), lon)
                      ! lo%geolut%w(:,i,j) = idw_weights(hi%lat(i,j), lat, hi%lon(i,j), lon)
                      ! lo%geolut%w(:,i,j) = bilin_weights(hi%lat(i,j), lat, hi%lon(i,j), lon)
                  endif
  
              enddo
          enddo
  
      end subroutine geo_LUT
  
      !>------------------------------------------------------------
  