Extract grid size as constant.