  We consider planets composed of water ice and rock, located far from a
central star. In an earlier study, computing the growth of planets by
continuous accretion, we found that a large fraction of the ice evaporates upon
accretion, creating a water vapor atmosphere. Here we consider accretion as a
discrete series of planetesimal impacts (of order $10^8$), at the same
time-dependent accretion rate, and investigate the fate of the vapor, as a
result of its interaction with the accreting planetesimals. We find that a
large fraction of the vapor escapes. The remaining fraction may form an outer
layer of ice after the termination of accretion and cooling of the surface. The
escaped water mass may significantly alter the ice-to-rock ratio of the planet.
We investigate the effect of different choices of parameters such as the
ice-to-rock ratio, the planetesimal size distribution, and the impact
velocities. We find that the planetesimal size distribution has a negligible
effect and explain why. By contrast, the ice-to-rock ratio and impact
velocities affect the fraction of retained water masses considerably.
