def map_full_well_names(dir, case_name):
    
    """

    Define a dict map between short 8char names in Eclipse and full Petrel names as specified in the SCH file, it works 
    by parsing the SCH file line by line, find the begining of the WELSPECS section and read first and last words

    Parameters:
        dir (string): path to case folder
        case_name (string): case name

    Returns:
        well_mapper (dict): mapper between Eclipse namesand full Petrel names as seen in the SCH file

    """

    sch_file = dir + '/' + case_name + '_SCH.INC'  # build the file name to point to the SCH file
    dat_file = dir + '/' + case_name + '.DATA'  # build the file name to point to the DATA file
    no_wells = 0
    with open(dat_file, 'r') as file:
            while True:
                line = file.readline()
                if 'WELLDIMS' in line:  # header of the WELSPECS section
                    line = file.readline()
                    no_wells = int(line.split()[0])
                    break

    well_mapper = {}  # initialize the new dict [old_wellname]: 'new_wellname'
    with open(sch_file, 'r') as file:
        while len(well_mapper) < no_wells:
            line = file.readline()
            if 'WELSPECS' in line:  # header of the WELSPECS section
                line = file.readline()
                if line[:2] == '--':  # all relevant lines start as Eclipse comment
                    well_mapper[line.split()[0][3:-1]] = line.split()[-1][1:-1]
                    line = file.readline()  # it has a final empty comment line, no harm

    return well_mapper