What are necessary conditions to form convective clouds with their flat cloud base, like this one:
I know that convective instalibity at the ground is at start of the process, but I have realized that I don't understand what exactly determines the height of the cloud base. Usually, it is told that the rising bubble of air expands, cools and finally its temperature drops below dew point and water droplets form. But the bubble must be warmer than the surrounding air to ascend, so is warmer also at cloud base and even so water condenses inside the bubble and not outside it.