function surrogate_2d_2d_vertical This is the main program of the Iterative Amplitude Adapted Fourier Transform (IAAFT) method to make surrogate fields. This version makes 2D fields based on the statistical properties of 2D fields. The amplitude distribution is supposed to depend on height, thus the amplitude distribution is adapted for each height level seperately. The IAAFT method was developped by Schreiber and Schmitz (see e.g. Phys. Rev Lett. 77, pp. 635-, 1996) for statistical non-linearity tests for time series. This method makes fields that have a specified amplitude distribution and power spectral coefficients. It works by iteratively adaptation the amplitude distribution and the Fourier coefficients (the phases are not changed in this step). Do not use this program without understanding the function iaaft_loop_2d_vertical and tuning its variables to your needs.
0001 % function surrogate_2d_2d_vertical 0002 % 0003 % This is the main program of the Iterative Amplitude Adapted Fourier 0004 % Transform (IAAFT) method to make surrogate fields. This version makes 2D 0005 % fields based on the statistical properties of 2D fields. The amplitude distribution 0006 % is supposed to depend on height, thus the amplitude distribution is 0007 % adapted for each height level seperately. 0008 % 0009 % The IAAFT method was developped by Schreiber and Schmitz (see e.g. Phys. 0010 % Rev Lett. 77, pp. 635-, 1996) for statistical non-linearity tests for time series. 0011 % This method makes fields that have a specified amplitude distribution and 0012 % power spectral coefficients. It works by iteratively adaptation the amplitude 0013 % distribution and the Fourier coefficients (the phases are not changed in this 0014 % step). Do not use this program without understanding the function 0015 % iaaft_loop_2d_vertical and tuning its variables to your needs. 0016 0017 % This Matlab version was written by Victor Venema, 0018 % Victor.Venema@uni-bonn.de, http:\\www.meteo.uni-bonn.de\victor, or 0019 % http:\\www.meteo.uni-bonn.de\victor\themes\surrogates\ 0020 % for the generation of surrogate cloud fields. 0021 % First version: May 2003. 0022 % This version: November 2003. 0023 0024 % Copyright (C) 2003 Victor Venema 0025 % This program is free software; you can redistribute it and/or 0026 % modify it under the terms of the GNU General Public License 0027 % as published by the Free Software Foundation; version 2 0028 % of the License. 0029 % 0030 % This program is distributed in the hope that it will be useful, 0031 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0032 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0033 % GNU General Public License for more details. 0034 % 0035 % To get a copy of the GNU General Public License look on internet 0036 % or write to the Free Software Foundation, Inc., 59 Temple Place - 0037 % Suite 330, Boston, MA 02111-1307, USA. 0038 0039 % Load data. 0040 [fourier_coeff_2d, sorted_values_prof, x, y, template, mean_pdf_profile, no_values_x, no_values_y] = load_2d_data_vertical(1); 0041 0042 % Main iterative loop for 2d-surrogates 0043 [surrogate, error_amplitude, error_spec] = iaaft_loop_2d_vertical(fourier_coeff_2d, sorted_values_prof); 0044 template = remove_average_profile(template, -mean_pdf_profile); % Add the mean profile to the 'template', to get the original measurement 0045 surrogate = remove_average_profile(surrogate', -mean_pdf_profile); % Add the mean profile to the surrogate 0046 0047 % plot results 0048 plot_2d_surrogate(y, x, template, 'template') 0049 plot_2d_surrogate(y, x, surrogate, 'surrogate')