    def __initialize_velocity_perturbations(self):
        """
        Initialize the velocity perturbators for each ensemble member if the velocity
        perturbation method is specified.
        """
        if self.__config.velocity_perturbation_method is not None:
            init_vel_noise, generate_vel_noise = noise.get_method(
                self.__config.velocity_perturbation_method
            )

            self.__state.velocity_perturbations = []
            for j in range(self.__config.n_ens_members):
                kwargs = {
                    "randstate": self.__state.random_generator_motion[j],
                    "p_par": self.__params.velocity_perturbation_kwargs.get(
                        "p_par", self.__params.velocity_perturbation_parallel
                    ),
                    "p_perp": self.__params.velocity_perturbation_kwargs.get(
                        "p_perp", self.__params.velocity_perturbation_perpendicular
                    ),
                }
                vp = init_vel_noise(
                    self.__velocity,
                    1.0 / self.__config.kmperpixel,
                    self.__config.timestep,
                    **kwargs,
                )
                self.__state.velocity_perturbations.append(
                    lambda t, vp=vp: generate_vel_noise(vp, t * self.__config.timestep)
                )
        else:
            self.__state.velocity_perturbations = None
        print("Velocity perturbations initialized successfully.")
Initialize the velocity perturbators for each ensemble member if the velocity
perturbation method is specified.
pysteps/nowcasts/steps.py