For a more robust and time-efficient Matlab implementation, see https://se.mathworks.com/matlabcentral/fileexchange/68632-wind-field-simulation-the-fast-version. A ...