Let's say there's a puddle of water on the ground. I use a magical device to give it enough thermal energy to vaporize into water vapor. The water vapor floats up into the sky. I then use the magical device to absorb the same amount of thermal energy I previously gave it. The water vapor then condenses to water and falls back on the ground and forms the same puddle of water on the ground.

My device absorbed and gave the same amount of energy, therefore the net energy in the system should be the same. However, it seems like the system's energy should increase from the water vapor floating up into the sky and producing thermal energy from friction with the air molecules. It should also produce more energy from friction with the air when it falls as rain drops towards the Earth and also when it hits the ground and disperses more thermal energy from its kinetic energy.

This breaks the law of conservation of energy, but I don't see what's wrong with my model. I thought about this when I read that the rain produces a lot of thermal energy from friction with the air.