def findLowTempIndex(lowTempMassFrac, X, Z):
    """
    Find the index for the LA08 data which has the same mass fractions X and Z.
    """

    idx = 0
    for i in range(lowTempMassFrac.shape[0]):
        if lowTempMassFrac[i, 1] == X and lowTempMassFrac[i, 3] == Z:
            idx = i
            break

    if idx == 0:
        print("\nUh oh! Couldn't find default LA08 table for X = {} and Z = {}".format(X, Z))
        print("4D interpolation hasn't been implemented because I'm being lazy")
        exit(1)

    return idx