def _az_string(az):
    """Return an azimuth angle as compass direction.

        >>> _az_string(0)
        'N'
        >>> _az_string(11)
        'N'
        >>> _az_string(12)
        'NNE'
        >>> _az_string(360 - 12)
        'NNW'
        >>> _az_string(360 - 11)
        'N'
    """
    assert 0.0 <= az <= 360

    compass = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW']
    assert len(compass) == 16

    step = 360 / len(compass)

    idx = int(round(az / step)) % len(compass)
    assert 0 <= idx < len(compass)

    return compass[idx]