def poreSpaceTemperature(T_D, Q, S_thick, K):
    """
    This function will calculate the temperature of the pore space. This is 
    based on equation S4.

    Inputs:
        T_D     - deep ocean temperature [K]
        Q       - pore space heat flow relative to modern Earth [dimensionless]
        S_thick - the thickness of the ocean sediment relative to modern Earth 
                  [dimensionless]
        K       - conductivity of the pore space sediments [m K-1]

    Returns:
    T_pore - the temperature of the pore space [K]
    """

    sed = S_thick*700 #modern Earth sediment thickness is ~700 m
    T_pore = T_D + Q*sed/K

    return T_pore