  Short-range charge-density wave correlations are ubiquitous in underdoped
cuprates. They are largely confined to the copper-oxygen planes and typically
oscillate out of phase from one unit cell to the next in the c-direction.
Recently, it was found that a considerably longer-range charge-density wave
order develops in YBCO above a sharply defined crossover magnetic field. This
order is more three-dimensional and is in-phase along the c-axis. Here, we show
that such behavior is a consequence of the conflicting ordering tendencies
induced by the disorder potential and the Coulomb interaction, where the
magnetic field acts to tip the scales from the former to the latter. We base
our conclusion on analytic large-N analysis and Monte-Carlo simulations of a
non-linear sigma model of competing superconducting and charge-density wave
orders. Our results are in agreement with the observed phenomenology in the
cuprates, and we discuss their implications to other members of this family,
which have not been measured yet at high magnetic fields.
