>>> import sphere
Doing that step will tell you if you have installed Spherepack and other
contributed packages!
Step 1. Get winds u and v and their grid vectors, longitude values (lonvals)
and latitude values (latvals), from somewhere.This example uses 2D fields
for simplicity. The fields must be global without missing values.
Hint: latvals = u.getLatitude()[:] and lonvals = u.getLongitude()[:]
Step 2. Make an instance of the Sphere class, x, as
>>> x = sphere.Sphere(lonvals, latvals)
Step 3. Compute the streamfunction, sf, and the velocity potential, vp, using
>>> sf, vp = x.sfvp(u, v)
If you do not have the contrib packages installed...... please install them by reading the installation instructions.
There is more extensive documentation of the sphere module which I am attaching with this e-mail.