def read_data_asc(f):
    """
    Read the elevation data from 
    the file 'f'. This data will be returned as a
    two-dimensional list to be interpreted as:
    [
        Y1:[X1, X2, ...Xn],
        Y2:[X1, X2, ...Xn],
        ...
        Yn:[X1, X2, ...Xn]
    ]
    """
    data         = list()
    
    header = True
    for line in f:
        if not header:
            line = line.strip() #strip all leading/trailing whitespace
            line_list = line.split(" ")
            float_list=[float(elem) for elem in line_list]
            data.append(float_list)
            
        elif "NODATA" in line: #indicates end of header
            header = False
            
    return data