    def __initialize_nowcast_components(self):
        """
        Initialize the FFT, bandpass filters, decomposition methods, and extrapolation method.
        """
        # Initialize number of ensemble workers
        self.__params.num_ensemble_workers = min(
            self.__config.n_ens_members, self.__config.num_workers
        )

        M, N = self.__precip.shape[1:]  # Extract the spatial dimensions (height, width)

        # Initialize FFT method
        self.__params.fft = utils.get_method(
            self.__config.fft_method, shape=(M, N), n_threads=self.__config.num_workers
        )

        # Initialize the band-pass filter for the cascade decomposition
        filter_method = cascade.get_method(self.__config.bandpass_filter_method)
        self.__params.bandpass_filter = filter_method(
            (M, N),
            self.__config.n_cascade_levels,
            **(self.__params.filter_kwargs or {}),
        )

        # Get the decomposition method (e.g., FFT)
        (
            self.__params.decomposition_method,
            self.__params.recomposition_method,
        ) = cascade.get_method(self.__config.decomposition_method)

        # Get the extrapolation method (e.g., semilagrangian)
        self.__params.extrapolation_method = extrapolation.get_method(
            self.__config.extrapolation_method
        )

        # Generate the mesh grid for spatial coordinates
        x_values, y_values = np.meshgrid(np.arange(N), np.arange(M))
        self.__params.xy_coordinates = np.stack([x_values, y_values])

        self.__precip = self.__precip[-(self.__config.ar_order + 1) :, :, :].copy()
        # Determine the domain mask from non-finite values in the precipitation data
        self.__params.domain_mask = np.logical_or.reduce(
            [~np.isfinite(self.__precip[i, :]) for i in range(self.__precip.shape[0])]
        )

        print("Blended nowcast components initialized successfully.")
Initialize the FFT, bandpass filters, decomposition methods, and extrapolation method.
pysteps/blending/steps.py