@exporter.export
@preprocess_xarray
def parse_angle(input_dir):
    'Calculate the meteorological angle from directional text.\n\n    Works for abbrieviations or whole words (E -> 90 | South -> 180)\n    and also is able to parse 22.5 degreee angles such as ESE/East South East\n\n    Parameters\n    ----------\n    input_dir : string or array-like\n        Directional text such as west, [south-west, ne], etc\n\n    Returns\n    -------\n    `pint.Quantity`\n        The angle in degrees\n\n    '
    if isinstance(input_dir, str):
        abb_dirs = _clean_direction([_abbrieviate_direction(input_dir)])
    elif hasattr(input_dir, '__len__'):
        input_dir_str = ','.join(_clean_direction(input_dir, preprocess=True))
        abb_dir_str = _abbrieviate_direction(input_dir_str)
        abb_dirs = _clean_direction(abb_dir_str.split(','))
    else:
        return np.nan
    return itemgetter(*abb_dirs)(DIR_DICT)
Calculate the meteorological angle from directional text.

Works for abbrieviations or whole words (E -> 90 | South -> 180)
and also is able to parse 22.5 degreee angles such as ESE/East South East

Parameters
----------
input_dir : string or array-like
    Directional text such as west, [south-west, ne], etc

Returns
-------
`pint.Quantity`
    The angle in degrees
@exporter.export
@preprocess_xarray
def parse_angle(input_dir):
    'Calculate the meteorological angle from directional text.\n\n    Works for abbrieviations or whole words (E -> 90 | South -> 180)\n    and also is able to parse 22.5 degreee angles such as ESE/East South East\n\n    Parameters\n    ----------\n    input_dir : string or array-like\n        Directional text such as west, [south-west, ne], etc\n\n    Returns\n    -------\n    `pint.Quantity`\n        The angle in degrees\n\n    '
    if isinstance(input_dir, str):
        abb_dirs = _clean_direction([_abbrieviate_direction(input_dir)])
    elif hasattr(input_dir, '__len__'):
        input_dir_str = ','.join(_clean_direction(input_dir, preprocess=True))
        abb_dir_str = _abbrieviate_direction(input_dir_str)
        abb_dirs = _clean_direction(abb_dir_str.split(','))
    else:
        return np.nan
    return itemgetter(*abb_dirs)(DIR_DICT)