  In this work, we study deuterium fractionation in four starless cores in the
low-mass star-forming region L1688 in the Ophiuchus molecular cloud. We study
how the deuterium fraction ($R_D$) changes with environment, compare
deuteration of ions and neutrals, core centre and its envelope, and attempt to
reproduce the observed results with a gas-grain chemical model. We chose high
and low gas density tracers to study both core centre and the envelope. With
the IRAM 30m antenna, we mapped N$_2$H$^+$(1-0), N$_2$D$^+$(1-0),
H$^{13}$CO$^+$ (1-0) and (2-1), DCO$^+$(2-1), and
$p$-NH$_2$D(1$_{11}$-1$_{01}$) towards the chosen cores. The missing $p$-NH$_3$
and N$_2$H$^+$(1-0) data were taken from the literature. To measure the
molecular hydrogen column density, dust and gas temperature within the cores,
we used the Herschel/SPIRE dust continuum emission data, the GAS survey data
(ammonia), and the COMPLETE survey data to estimate the upper limit on CO
depletion. We present the deuterium fraction maps for three species towards
four starless cores. Deuterium fraction of the core envelopes traced by
DCO$^+$/H$^{13}$CO$^+$ is one order of magnitude lower ($\sim$0.08) than that
of the core central parts traced by the nitrogen-bearing species ($\sim$0.5).
Deuterium fraction increases with the gas density as indicated by high
deuterium fraction of high gas density tracers and low deuterium fraction of
lower gas density tracers and by the decrease of $R_D$ with core radii,
consistent with the predictions of the chemical model. Our model results show a
good agreement with observations for $R_D$(N$_2$D$^+$/N$_2$H$^+$) and
R$_D$(DCO$^+$/HCO$^+$) and underestimate the $R_D$(NH$_2$D/NH$_3$).
