FWGN model implementation vs explaination (textbook pages attached)
I assume that the function Doppler_spectrum computes the desired power spectrum of the noise. Since the power spectrum of a filtered noise process gets multiplied with the squared magnitude of the filter's frequency response, the filter's frequency response needs to be square root of the desired power spectrum (assuming white noise at the filter's input).

In formulas, if a random process $X(t)$ with power spectrum $S_X(\omega)$ is filtered by an LTI system with frequency response $H(\omega)$, the power spectrum $S_Y(\omega)$ of the output signal $Y(t)$ is given by

$$S_Y(\omega)=S_X(\omega)|H(\omega)|^2$$