Convert time scalar field to velocity vector field

I am trying to figure out if it's possible to create vector velocity field from some raster containing spatial distribution of scalar variable (timestamp of some mass-media event in my case).

Here is my GeoTIFF overlapped with isochrones drown from the six-hours interval. Cold colors correspond to zones where some event happened earlier. Warm colors match to the areas where that event occurred later:

I would like to convert that GeoTIFF image to format quite common for fluid dynamics and hydro-meteorology: a quiver plot. I suggest that vectors should represent the speed of information spatial dissemination.

import gdal
from gdalconst import *
import numpy
import pylab

#Making the dataset little bit sparser...
nth=4
ar = _ar[::nth, ::nth]
X = numpy.arange(0, _ar.shape[0], nth)
Y = numpy.arange(0, _ar.shape[0], nth)

pylab.quiver(X, Y, x, y)
pylab.savefig("out.png")


The resulting vector field:

I guess I'm doing something wrong in the code above cause result is confusing. You can see that in fact I'm getting the gradients of timestamp, whereas I really need the gradients of velocity. The warmer zones are surrounded by large arrows corresponding to long periods of information dissemination, BUT I need the opposite effect:

longer time lag <-> low information distribution speed <-> warmer color <-> shorter arrows

shorter time lag <-> high information distribution speed <-> colder color <-> longer arrows

I would appreciate to get possible solutions in Python or R.

• Could you elaborate on exactly how your result is "wrong"? What would the right result look like and what would it represent? – whuber Nov 20 '14 at 23:49
• @whuber, I think I get time gradients whereas I really need velocity gradients. – Vitaly Isaev Nov 21 '14 at 0:02