def parse_swarm_mio_header(line):
    """ Parse the Swarm MIO_SHA_2* file header. """
    fields = line.split()
    colat_ngp = float(fields[6])
    lat_ngp = float(fields[7])
    return {
        "nmax": int(fields[0]),
        "mmax": int(fields[1]),
        "pmin": int(fields[2]),
        "pmax": int(fields[3]),
        "smin": int(fields[4]),
        "smax": int(fields[5]),
        "theta_NGP": colat_ngp,
        "phi_NGP": lat_ngp,
        "lat_NGP": 90.0 - colat_ngp,
        "lon_NGP": 180 - ((180 - lat_ngp) % 360),
        "height": float(fields[8]),
        "wolf_ratio": float(fields[9]),
    }