def get_platform_variables(ds):
    '''
    Returns a list of platform variable NAMES

    :param netCDF4.Dataset ds: An open netCDF4 Dataset
    '''
    candidates = []
    for variable in ds.variables:
        platform = getattr(ds.variables[variable], 'platform', '')
        if platform and platform in ds.variables:
            if platform not in candidates:
                candidates.append(platform)

    platform = getattr(ds, 'platform', '')
    if platform and platform in ds.variables:
        if platform not in candidates:
            candidates.append(platform)
    return candidates
def get_platform_variables ( ds ) : candidates = [ ] for variable in ds . variables : platform = getattr ( ds . variables [ variable ] , 'platform' , '' ) if platform and platform in ds . variables : if platform not in candidates : candidates . append ( platform ) platform = getattr ( ds , 'platform' , '' ) if platform and platform in ds . variables : if platform not in candidates : candidates . append ( platform ) return candidates
Returns a list of platform variable NAMES

    :param netCDF4.Dataset ds: An open netCDF4 Dataset