streamfn
Computes the stream function from spectral (shperical harmonics) vorticity GRIB fields.
Note
This function performs the same task as the Velocity Potential or Stream Function icon in Metview’s user interface. It accepts its parameters as keyword arguments, described below.
- streamfn(**kwargs)
Computes the stream function from spectral (spherical harmonics) vorticity GRIB fields.
- Parameters
data (
Fieldset
) – Specifies the vorticity GRIB fields. Must be spectral (spherical harmonics) data.truncation (number, default: 216) – Specifies the triangular truncation to be applied to the spherical harmonics input data prior to conversion to lat/lon.
smoothing ({"yes", "no"}, default: "no") –
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^{(-\frac {n(n+1)}{fltc(fltc+1)})^{mfltexp}}\]where:
n: is the wavenumber
fltc, mfltexp: see below
This is roughly equivalent to a \(\nabla^{2 \times mfltexp}\) operator in grid point space.
fltc (number, default: 19.4) – Specifies the value of the parameter fltc to be used in the smoothing filter. Only available if
smoothing
set to “yes”.mfltexp (number, default: 2) – Specifies the value of the parameter
mfltexp
to be used in the smoothing filter. Only available ifsmoothing
is set to “yes”. The default value is 2, roughly equivalent to a \(\nabla^{4}\) operator in grid point space.
- Return type