wrf.metadecorators.set_cape_metadata¶
- wrf.metadecorators.set_cape_metadata(is2d)¶
A decorator that sets the metadata for a wrapped CAPE function’s output.
This is a special metadata decorator for working with CAPE functions.
If the wrapped function’s meta argument is False, then this decorator returns the wrapped function output without applying the metadata.
- Parameters:
is2d (
bool
) – Set to True if the wrapped function is for a two-dimensional CAPE routine. Set to False for a three-dimensional CAPE routine.- Returns:
The wrapped CAPE 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 anumpy.ndarray
object with no metadata.- Return type: