Some layers use coordIds to store their data. A coordId is always the result of the following formula:
var coordId = gridBasedX + gridBasedY * gridBasedWidth;
This means that you can get gridBasedY from a coordId like this:
var gridBasedY = Math.floor( coordId / gridBasedWidth );
var gridBasedX = coordId - gridBasedY * gridBasedWidth
Please note that grid based values are usually prefixed with a c:
cx/cyfor a grid based X/YcWid/cHeifor a grid based width/height