Returns the name of the variable identified by a grid_mapping attribute

    :param netCDF4.Dataset ds: An open netCDF4 Dataset

def get_crs_variable(ds):
    '''
    Returns the name of the variable identified by a grid_mapping attribute

    :param netCDF4.Dataset ds: An open netCDF4 Dataset
    '''
    for var in ds.variables:
        grid_mapping = getattr(ds.variables[var], 'grid_mapping', '')
        if grid_mapping and grid_mapping in ds.variables:
            return grid_mapping
    return None