wrf.smooth2d

wrf.smooth2d(field, passes, cenweight=2.0, meta=True)

Return the field smoothed.

The smoothing kernel applied is:

\[\begin{split}\frac{1}{4 + cenweight} * \begin{bmatrix} 0 & 1 & 0 \\ 1 & cenweight & 1 \\ 0 & 1 & 0 \end{bmatrix}\end{split}\]

Data values along the borders are left unchanged. This routine does not modify the original data supplied by the field parameter..

If you need more general purpose multidimensional filtering tools, try the scipy.ndimage.convolve() method.

Parameters:
Returns:

The smoothed field. If xarray is enabled and the meta parameter is True, then the result will be an xarray.DataArray object. Otherwise, the result will be either a numpy.ndarray or a numpy.ma.MaskedArray depending on the type for field.

Return type:

xarray.DataArray, numpy.ma.MaskedArray or numpy.ndarray)

See also

scipy.ndimage.convolve()