def get_main_variable(ds):
    """
    Returns biggest variable in netCDF4 Dataset.

    :param ds: netCDF4 Dataset object
    :return: netCDF4 Variable object
    """
    dsv = ds.variables
    sizes = [(dsv[ncvar].size, dsv[ncvar]) for ncvar in dsv]
    sizes.sort()

    return sizes[-1][1]