anchor.diff:                      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
  
positive.code:                 stop
              endif
  
              do i=ims, ime
                  curpos = find_location(lo, hi%lat(i,j), hi%lon(i,j), lastpos)
  
                  if (curpos%x<1) then
                      ! something broke, try assuming that the grids are the same possibly wrapping (for ideal)
                      write(*,*) "Error in Geographic interpolation, check input lat / lon grids", i,j
                      curpos%x = mod(i-1, lo_nx) + 1
  
negative.code:         endif
  
          ! also convert from a -180 to 180 coordinate system into a 0-360 coordinate system if necessary
          if ((minval(domain%lon) < -170) .and. (maxval(domain%lon) > 170)) then
              where(domain%lon<0) domain%lon = 360+domain%lon
          endif
  
      end subroutine standardize_coordinates
  
  