An opacity-sampled treatment of water vapor