def _check_sobol(grid, res):
    """
    Checks and unpacks whether sobol interpolation has been requested, and if Cartesian
    interpolation has been requested for Sobol grid, which is invalid.

    Parameters
    ----------
    grid : h5py file
        Handle of grid to process
    res : dict
        Dictionary of all the inputted resolution parameters

    Returns
    -------
    sobol : float/bool
        The scale value for across resolution if Sobol interpolation, False if not Sobol

    """
    # Read gridtype from header | Allow for usage of both h5py 2.10.x and 3.x.x
    # --> If things are encoded as bytes, they must be made into standard strings
    gridtype = grid["header/library_type"][()]
    if isinstance(gridtype, bytes):
        gridtype = gridtype.decode("utf-8")

    # Check type and inputted scale resolution
    if "sobol" in gridtype.lower():
        if res["scale"] < 1.0:
            errstr = "For Sobol type grid only an increase in tracks via the 'scale' "
            errstr += "parameter is possible, please enter a value > 1."
            raise KeyError(errstr)
        sobol = res["scale"]
    elif "cartesian" in gridtype.lower():
        if res["scale"] > 1.0:
            sobol = res["scale"]
        else:
            sobol = False
    elif "isochrones" in gridtype.lower():
        if res["scale"] < 1.0:
            errstr = "For isochrone grids only an increase in isochrones  via the "
            errstr += "'scale' parameter is possible, please enter a value > 1."
            raise KeyError(errstr)
        sobol = res["scale"]
    else:
        raise KeyError(
            "Interpolation not possible for grid of type {0}".format(gridtype)
        )

    # Highlight redundant resolution for the user
    if sobol:
        for var in res:
            if (var not in ["scale", "baseparam"]) and res[var] != 0:
                prtstr = "Gridresolution in '{0}' is set but ignored, ".format(var)
                prtstr += "as 'scale' is set for Sobol interpolation."
                print(prtstr)
    return sobol