fixing the index calculation for grids that aren't 1 degree