Added reading of grid dimensions
p4#: 21154