wrf.from_var¶
-
class
wrf.from_var(varname, attribute)¶ A callable class that retrieves attributes from the function argument.
If the function argument is not of type
xarray.DataArray, then None will be returned.It is assumed that the function has been wrapped using the
wraptmodule.-
__call__(wrapped, *args, **kwargs)¶ Return the attribute found in the function arguments.
Parameters: - wrapped – The wrapped function, as used by the
wraptmodule. - *args – The function arguments.
- **kwargs – The function keyword arguments.
Returns: The requested attribute.
Return type: - wrapped – The wrapped function, as used by the
Methods
__init__(varname, attribute)Initialize a from_varobject.-