  Using the Deep Potential methodology, we construct a model that reproduces
accurately the potential energy surface of the SCAN approximation of density
functional theory for water, from low temperature and pressure to about 2400 K
and 50 GPa, excluding the vapor stability region. The computational efficiency
of the model makes it possible to predict its phase diagram using molecular
dynamics. Satisfactory overall agreement with experimental results is obtained.
The fluid phases, molecular and ionic, and all the stable ice polymorphs,
ordered and disordered, are predicted correctly, with the exception of ice III
and XV that are stable in experiments, but metastable in the model. The
evolution of the atomic dynamics upon heating, as ice VII transforms first into
ice VII$''$ and then into an ionic fluid, reveals that molecular dissociation
and breaking of the ice rules coexist with strong covalent fluctuations,
explaining why only partial ionization was inferred in experiments.
