These are the same conditions as for ```vector_to_grid``` I think.
It might be nicer to have an interface similar to ```vector_to_grid``` which instead of taking ```u, v``` as arguments, takes a list of scalar arrays to be transformed. ```scalar_to_grid``` and ```vector_to_grid``` can then just call this with the appropriate arguments.