wrf.metadecorators.set_latlon_metadata

wrf.metadecorators.set_latlon_metadata(xy=False)

A decorator that sets the metadata for a wrapped latlon function’s output.

This is a special metadata decorator for working with latlon functions.

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

Parameters:

xy (bool, optional) – Set to True if the wrapped function returns xy values (ll_to_xy). Set to False if the wrapped function returns latlon values (xy_to_ll). Default is False.

Returns:

The wrapped latlon 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