def get_human_readable_resolution(ds):
    """Get human readable resolution string

    Returns a human readable resolution string.
    I.e "1 km", "500 m" or "0.1 deg".

    Requires the resolution to be available by 'rioxarray'

    Parameters
    ----------
        ds : xr.DataSet
            The dataset to read the resolution from.

    Returns
    -------
        str
            The string with the human readable resolution
    """
    res = ds.rio.resolution()[0]
    if ds.rio.crs.is_geographic:
        units = "deg"
    else:
        units = ds.rio.crs.linear_units[0]
        if res >= 1000:
            res = res/1000
            units = f"k{units}"
    if int(res) == res:
        res = int(res)
    return f"{res} {units}"