Given the initial ground level ambient temperature T0', initial air parcel temperature T0 and the water vapour content of the moist air parcel, we would like to be able to say at what height in the atmosphere the water vapour starts condensing out. In order to do this we need to consider the different components making up the total pressure of the air parcel. The total atmospheric pressure is equal to the sum of the partial pressures of the individual gases, where the partial pressure is the pressure exerted by a gas in the mixture if it occupied the same volume as the mixture. This is know as Dalton's Law of partial pressure. If pa is the total pressure of the air parcel then pa = pd + e where pd is the partial pressure exerted by dry air and e is the partial pressure exerted by water vapour. We know that as the moist air parcel rises it expands in order to match the atmospheric pressure, and we assume that is does so instantly. Using a formula for the atmospheric pressure we therefore have the partial pressure of water vapour as a function of height (meters)
The figure below shows how the water vapour pressure evolves with height. We now use a formula for the saturation pressure of water vapour, that is the maximum amount of pressure the water vapour can exert in the air parcel before the vapour starts condensing out into water droplets. We use the approximation for the saturation vapour pressure of water vapour over liquid in terms of temperature T derived from the Clausius-Clapeyron equation
Here we have plotted the water vapour partial pressure and the saturation pressure. The intersection indicates the point at which water vapour begins to condense out. This graph uses an initial ground level ambient temperature of 15oC, initial air parcel temperature of 35oC and initial water vapour pressure of 1000Pa indicating a cloud will form at around 3300m. Condensation occurs if the vapour pressure is greater than or equal to the saturation pressure, ie. if the air parcel is at or above the cloud formation height.