def get_central_coors(self, row, col):
        """Get the coordinates of central grid.

        Args:
            row: row number, range from 0 to (nRows - 1).
            col: col number, range from 0 to (nCols - 1).

        Returns:
            XY coordinates. If the row or col are invalid, raise ValueError.
        """
        if row < 0 or row >= self.nRows or col < 0 or col >= self.nCols:
            raise ValueError("The row (%d) or col (%d) must be >=0 and less than "
                             "nRows (%d) or nCols (%d)!" % (row, col, self.nRows, self.nCols))
        else:
            tmpx = self.xMin + (col + 0.5) * self.dx
            tmpy = self.yMax - (row + 0.5) * self.dx
            return tmpx, tmpy