Added script to go from patch (x,y,z) coordinates back to global index.