    def __initialize_random_generators(self):
        """
        Initialize random generators for precipitation noise, probability matching,
        and velocity perturbations. Each ensemble member gets a separate generator,
        ensuring reproducibility and controlled randomness in forecasts.
        """
        seed = self.__config.seed
        if self.__config.noise_method is not None:
            self.__state.randgen_precip = []
            for j in range(self.__config.n_ens_members):
                rs = np.random.RandomState(seed)
                self.__state.randgen_precip.append(rs)
                seed = rs.randint(0, high=1e9)

        if self.__config.probmatching_method is not None:
            self.__state.randgen_probmatching = []
            for j in range(self.__config.n_ens_members):
                rs = np.random.RandomState(seed)
                self.__state.randgen_probmatching.append(rs)
                seed = rs.randint(0, high=1e9)

        if self.__config.velocity_perturbation_method is not None:
            self.__state.randgen_motion = []
            for j in range(self.__config.n_ens_members):
                rs = np.random.RandomState(seed)
                self.__state.randgen_motion.append(rs)
                seed = rs.randint(0, high=1e9)

            (
                init_velocity_noise,
                self.__params.generate_velocity_noise,
            ) = noise.get_method(self.__config.velocity_perturbation_method)

            # initialize the perturbation generators for the motion field
            self.__params.velocity_perturbations = []
            for j in range(self.__config.n_ens_members):
                kwargs = {
                    "randstate": self.__state.randgen_motion[j],
                    "p_par": self.__params.velocity_perturbations_parallel,
                    "p_perp": self.__params.velocity_perturbations_perpendicular,
                }
                vp_ = init_velocity_noise(
                    self.__velocity,
                    1.0 / self.__config.kmperpixel,
                    self.__config.timestep,
                    **kwargs,
                )
                self.__params.velocity_perturbations.append(vp_)
        else:
            (
                self.__params.velocity_perturbations,
                self.__params.generate_velocity_noise,
            ) = (None, None)
Initialize random generators for precipitation noise, probability matching,
and velocity perturbations. Each ensemble member gets a separate generator,
ensuring reproducibility and controlled randomness in forecasts.
pysteps/blending/steps.py