def parse_variable_names(var):
    """Parse the variable names.
    
    Some variables don't have original names, and some don't have long names.
    Show a variable name, a long name and the coordinates, choosing
    attributes in this order:

        var name:  original_name, vkey
        long name: long_name, standard_name, vkey
    """
    if 'long_name' in var.attrs.keys():
        longname = var.attrs['long_name']
    elif 'standard_name' in var.attrs.keys():
        longname = var.attrs['standard_name']
    else:
        longname = var.name

    return {'name': var.name, 'longname': longname}