  The Rosseland mean opacity of dust in protoplanetary disks is often
calculated assuming the interstellar medium (ISM) size distribution and a
constant dust-to-gas ratio. However, the dust size distribution and the
dust-to-gas ratio in protoplanetary disks are distinct from those of the ISM.
Here, we use simple dust evolution models that incorporate grain growth and
transport to calculate the time evolution of mean opacity of dust grains as a
function of distance from the star. Dust dynamics and size distribution are
sensitive to the assumed value of the turbulence strength $\alpha_{\mathrm{t}}$
and the velocity at which grains fragment v$_{\mathrm{frag}}$. For
moderate-to-low turbulence strengths of $\alpha_{\mathrm{t}} \lesssim 10^{-3}$
and substantial differences in v$_{\mathrm{frag}}$ for icy and ice-free grains,
we find a spatially non-uniform dust-to-gas ratio and grain size distribution
that deviate significantly from the ISM values, in agreement with previous
studies. The effect of non-uniform dust-to-gas ratio on the Rosseland mean
opacity dominates over that of the size distribution. Spatially varying$-$that
is non-monotonic$-$dust opacity creates a region in the protoplanetary disk
that is optimal for producing hydrogen-rich planets, potentially explaining the
apparent peak in gas giant planet occurrence rate at intermediate distances.
Enhanced opacities within the ice line also suppress gas accretion rates onto
sub-Neptune cores, thus stifling their tendency to undergo runaway gas
accretion within disk lifetimes. Finally, our work corroborates the idea that
low mass cores with large primordial gaseous envelopes ('super-puffs')
originate beyond the ice line.
