wrf.metadecorators.set_interp_metadata

wrf.metadecorators.set_interp_metadata(interp_type)

A decorator that sets the metadata for a wrapped interpolation function.

If the wrapped function’s meta argument is False, then this decorator returns the wrapped function output without applying the metadata.

Parameters:interp_type (str) – The type of interpolation routine. Choices are: ‘horiz’, ‘cross’, ‘line’, ‘vinterp’, ‘2dxy’, ‘1d’, ‘xy’.
Returns:The wrapped interpolation function output with or without metadata. If xarray is enabled and the meta parameter is True, then the result will be a xarray.DataArray object. Otherwise, the result will be a numpy.ndarray object with no metadata.
Return type:xarray.DataArray or numpy.ndarray