Modeling the isotopic composition of precipitation