Metview's documentation is now on readthedocs!

# Velocity Potential or Stream Function

This icon returns GRIB fields of one of the following types :

• velocity potential (computed from divergence)
• stream function (computed from vorticity)

Spectral input/output only

The computations only work for spectral (spherical harmonics) input fields and the resulting data are also spectral GRIB fields.

From Macro/Python the icon can be called via the following functions: velpot() and  streamfn()

## The Velocity Potential/Stream Function Editor

This editor belongs to a type of editors known as family editors which allows related sets of input specifications to be grouped in the same icon editor. The main computation type can be set via the Application parameter which offers these options:

• velpot - to derive velocity potential fields from divergence
• streamfn- to derive stream function fields from vorticity

To operate with this icon first you need to select which type of output you want to create (parameter Application) then the available parameters will change in the editor according to your selection.

### Data

Specifies the data required for the application: it requires divergence for velocity potential and vorticity for stream function (both in spherical harmonics representation).

### Truncation

Specifies the truncation to be applied to the spherical harmonics input data prior to transformation to gridpoint space.

### Smoothing

Specifies whether to apply spatial smoothing to the spherical harmonics prior to transformation to grid points. This operation is performed after the truncation specified in Truncation . The smoothing filter is of the form :

$\exp\left(-(\frac{n\times (n+1)}{fltc\times (fltc+1)})^{mfltexp}\right)$

where,

• n: is the wavenumber
• fltc, mfltexp: see below

This filter is roughly equivalent to applying the $$\nabla^{2\times mfltexp}$$ operator in grid point space.

### Fltc

Specifies the value of the parameter fltc to be used in the smoothing filter. Only available if Smoothing is set to Yes. The default value is 19.4

### Mfltexp

Specifies the value of the parameter mfltexp to be used in the smoothing filter. Only available if Smoothing is set to Yes. The default value is 2, roughly equivalent to applying the $$\nabla^{4}$$ operator in gridpoint space.