Fog is simply a cloud that touches the ground. It is made of tiny water droplets suspended in the air. Sometimes you can get precipitation out of fog, like the ice crystals I saw this morning.
Fog can form under several different circumstances but all types require two things: a cooling air parcel and water vapor. The main types include radiation fog, up-slope fog, advection fog, and evaporation fog.
Radiation fog is the type of fog we experienced this morning. Since yesterday was sunny, a lot of the snow melted and evaporated giving one of the ingredients for fog: water vapor. The inversion kept the moist air in the valleys overnight. The second ingredient for fog, cooling temperatures, came during the night. The lowest temperatures happen right before the sun comes up. Since cold air can't hold as much water vapor as warm air, water vapor will condense into tiny water droplets. The temperature at which water turns from a gas to a liquid (condensation) is called the dew point temperature. The dew point temperature is a function of temperature and and amount of water in the air. Relative humidity is a similar measurement. The combination of the evaporating snow and the cold night caused our fog this morning. When the sun came out it warmed the air turning the water droplets back to water vapor. This happens from the surface up, which is why it looks like the fog "lifts" when the sun shines.
|(I stole this off the internet. I'm still looking for my picture.|
Advection fog is when warm, moist air moves across cold surfaces. This is common on coasts when moist ocean air moves inland over the cold land like the infamous San Francisco fog.
Evaporation fog is caused by a warm lake evaporating when the air above is cold. You might see this at Yellowstone in the winter when the hot springs evaporate water vapor into the cold air. You can also get evaporation fog over a warm lake when air temperatures are cold.