A general circulation model of water isotope cycles in the atmosphere