Basic principles of water harvesting