  Aims: Our aim is to determine the critical parameters in water chemistry and
the contribution of water to the oxygen budget by observing and modelling water
gas and ice for a sample of eleven low-mass protostars, for which both forms of
water have been observed.
  Methods: A simplified chemistry network, which is benchmarked against more
sophisticated chemical networks, is developed that includes the necessary
ingredients to determine the water vapour and ice abundance profiles in the
cold, outer envelope in which the temperature increases towards the protostar.
Comparing the results from this chemical network to observations of water
emission lines and previously published water ice column densities, allows us
to probe the influence of various agents (e.g., FUV field, initial abundances,
timescales, and kinematics).
  Results: The observed water ice abundances with respect to hydrogen nuclei in
our sample are 30-80ppm, and therefore contain only 10-30% of the volatile
oxygen budget of 320ppm. The keys to reproduce this result are a low initial
water ice abundance after the pre-collapse phase together with the fact that
atomic oxygen cannot freeze-out and form water ice in regions with T(dust)>15
K. This requires short prestellar core lifetimes of less than about 0.1Myr. The
water vapour profile is shaped through the interplay of FUV photodesorption,
photodissociation, and freeze-out. The water vapour line profiles are an
invaluable tracer for the FUV photon flux and envelope kinematics.
  Conclusions: The finding that only a fraction of the oxygen budget is locked
in water ice can be explained either by a short pre-collapse time of less than
0.1 Myr at densities of n(H)~1e4 cm-3, or by some other process that resets the
initial water ice abundance for the post-collapse phase. A key for the
understanding of the water ice abundance is the binding energy of atomic oxygen
on ice.
