add new optional function: grid_size.

this communicates the dimensions of the next write... we only know
this information through some transports, e.g. HDF5.
add library for programming streams in python.