GRAMSES: a new route to general relativistic $N$-body simulations in
  cosmology. Part II. Initial conditions
  We address the generation of initial conditions (ICs) for GRAMSES, a code for
nonlinear general relativistic (GR) $N$-body cosmological simulations recently
introduced in Ref. [1]. GRAMSES adopts a constant mean curvature slicing with a
minimal distortion gauge, where the linear growth rate is scale-dependent, and
the standard method for realising initial particle data is not
straightforwardly applicable. A new method is introduced, in which the initial
positions of particles are generated from the displacement field realised for a
matter power spectrum as usual, but the velocity is calculated by
finite-differencing the displacement fields around the initial redshift. In
this way, all the information required for setting up the initial conditions is
drawn from three consecutive input matter power spectra, and additional
assumptions such as scale-independence of the linear growth factor and growth
rate are not needed. We implement this method in a modified 2LPTic code, and
demonstrate that in a Newtonian setting it can reproduce the velocity field
given by the default 2LPTic code with subpercent accuracy. We also show that
the matter and velocity power spectra of the initial particle data generated
for GRAMSES simulations using this method agree very well with the
linear-theory predictions in the particular gauge used by GRAMSES. Finally, we
discuss corrections to the finite difference calculation of the velocity when
radiation is present, as well as additional corrections implemented in GRAMSES
to ensure consistency. This method can be applied in ICs generation for GR
simulations in generic gauges, and simulations of cosmological models with
scale-dependent linear growth rate.
