Exchange of water vapor between the atmosphere and surface of Mars