clean % Change to working directory - you'll have to edit this line. Just % change it to the directory where you dump all of the files that you % downloaded from the website (including this file). cd /Users/dvimont/Class/aos760/Notes/WES/WES_modes %%% Define model paramters %%% % Now, set up parameters: Note that if you want to change anything, % like the amplitude of Kq or the WES parameter, you can do so in the % "wes_model_gill" routine, or here. If you do it here, you'll have to % comment out the appropriate line in wes_model_gill.m . Lx = 240; % Zonal wavelength in degrees. Try changing this. wesh = 15; % Amplitude of WES feedback (W m^-2 K^-1). Try % changing this %%% Obtain linear model (a matrix M) %%% wes_model_gill; %%% Now, get normal modes of 'M' %%% [vc, lamc] = eig(M); % Eigenvectors (v) and eigenvalues (lam) lamc = diag(lamc); %%% Now, note that we could obtain the uncoupled modes by eliminating %%% every fourth row or column of M - this eliminates coupling with the %%% temperature equaiton (every fourth column) as well as the %%% temperature equation itself (every fourth row). Take a look at the %%% in Question (4) of the writeup. ny = length(y); ind = sort([1:4:(4*ny) 2:4:(4*ny) 3:4:(4*ny)]); Mu = M(ind,ind); % Uncoupled model [vu, lamu] = eig(Mu); % e-vect. / e-val. of uncoupled system lamu = diag(lamu); %%% Organize coupled modes in terms of stability [tem, ind] = sort(-real(lamc)); % Try changing which mode you'll plot, by changing 'ii'. ii = 2; plot_struct_lin_gill2 % Now, plot the eigenspectrum plot_spect_gill % Use the 'zoom' tool, or the 'axis' command to zoom in on the set of % coupled SST modes. Note that the remaining modes look pretty similar % to the uncoupled modes - these are just the standard gravity and % Rossby waves that emerge as in Matsuno. The blue dots are the % uncoupled eigenvalues, the red circles are the coupled eigenvalues. % Another way to see this is to gradually decrease Lx from planetary % wave-lengths to about the Rossby radius (about 10 degrees). Note that % the gravity wave phase speed increases considerably - this reminds us % of the dispersion relationship, no?