def _parsemeta_tmy2(columns, line):
    """Retrieves metadata from the top line of the tmy2 file.

    Parameters
    ----------
    columns : string
        String of column headings in the header

    line : string
        Header string containing DataFrame

    Returns
    -------
    meta : Dict of metadata contained in the header string
    """
    rawmeta = ' '.join(line.split()).split(' ')
    meta = rawmeta[:3]
    meta.append(int(rawmeta[3]))
    longitude = (float(rawmeta[5]) + float(rawmeta[6]) / 60) * (2 * (
        rawmeta[4] == 'N') - 1)
    latitude = (float(rawmeta[8]) + float(rawmeta[9]) / 60) * (2 * (rawmeta
        [7] == 'E') - 1)
    meta.append(longitude)
    meta.append(latitude)
    meta.append(float(rawmeta[10]))
    meta_dict = dict(zip(columns.split(','), meta))
    return meta_dict
