The distribution of deuterium and 18O in dry soils: 3. Theory for non-isothermal water movement