/[MITgcm]/MITgcm/verification/tutorial_global_oce_latlon/diags_matlab/mit_plotstreamfunctions.m
ViewVC logotype

Annotation of /MITgcm/verification/tutorial_global_oce_latlon/diags_matlab/mit_plotstreamfunctions.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Sat Aug 12 20:25:13 2006 UTC (17 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint58u_post, checkpoint58w_post, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint58r_post, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint58q_post, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint59, checkpoint58o_post, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint58v_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, HEAD
Changes since 1.2: +1 -1 lines
accidentally removed ; put them back.

1 jmc 1.1 % m-file: mit_plotstreamfunctions.m
2    
3 jmc 1.3 % $Header: $
4 jmc 1.1 % $Name: $
5    
6     % select timestep
7     k=kmax;
8    
9     if iscell(u)
10     uk = u{k};
11     else
12     uk = squeeze(u(:,:,:,k));
13     end
14     if iscell(v)
15     vk = v{k};
16     else
17     vk = squeeze(v(:,:,:,k));
18     end
19    
20    
21     addlayer = 1;
22    
23     clear global_psi atlantic_psi baro_psi
24     % global overturning
25     global_psi = mit_overturning(vk,grd.hfacs,grd.dxg,grd.dz,addlayer);
26    
27     % atlantic overturning
28     atlantic_psi = mit_overturning(vk,grd.atlantic_hfacs,grd.dxg,grd.dz,addlayer);
29     % pacific overturning
30     pacific_psi = mit_overturning(vk,grd.pacific_hfacs,grd.dxg,grd.dz,addlayer);
31    
32     clear addlayer
33    
34     % global barotropic stream function
35     baro_psi = mit_barostream(uk,grd.umask,grd.dyg,grd.dz);
36    
37     % plot stream functions
38     figure('PaperPosition',[0.31 0.25 10.5 7.88],'PaperOrientation','landscape')
39     clear sh
40     sh(1) = subplot(2,2,1);
41     otlev = [-60:2:60];
42     contourf(grd.latg,-grd.zgpsi,global_psi'*1e-6,otlev);
43     hold on;
44     [cs h1] = contour(grd.latg,-grd.zgpsi,global_psi'*1e-6,[0 0]);
45     clh1 = clabel(cs);
46     hold off
47     caxis([-1 1]*max(abs(global_psi(:)))*1.e-6); colorbar('h')
48     psimin = min(min(global_psi(:,5:end)));
49     [iy iz] = find(abs(global_psi(:,:)-psimin)<=1e-4);
50     text(grd.latg(iy),-grd.zgpsi(iz), ...
51     ['\leftarrow ' num2str(psimin*1e-6,'%5.1f')], ...
52     'horizontalalignment','left')
53     title('global overturning streamfunction [Sv]')
54     sh(2) = subplot(2,2,2);
55     contourf(grd.latg,-grd.zgpsi,atlantic_psi'*1e-6,otlev);
56     hold on;
57     [cs h2] = contour(grd.latg,-grd.zgpsi,atlantic_psi'*1e-6,[0 0]);
58     clh2 = clabel(cs);
59     hold off
60     caxis([-1 1]*max(abs(atlantic_psi(:)))*1.e-6); colorbar('h');
61     psimax = max(atlantic_psi(13,5:end));
62     iz = find(abs(atlantic_psi(13,:)-psimax)<=1e-4);
63     text(grd.latg(13),-grd.zgpsi(iz), ...
64     [num2str(psimax*1e-6,'%5.1f') ' \rightarrow'], ...
65     'horizontalalignment','right')
66     psimin = min(min(atlantic_psi(1:35,5:end)));
67     [iymin,izmin] = find(abs(atlantic_psi(:,:)-psimin)<=1e-4);
68     text(grd.latg(iymin),-grd.zgpsi(izmin), ...
69     [num2str(psimin*1e-6,'%5.1f') ' \rightarrow'], ...
70     'horizontalalignment','right')
71     title('atlantic overturning streamfunction [Sv]')
72     %
73     sh(3) = subplot(2,2,3);
74     contourf(grd.latg,-grd.zgpsi,pacific_psi'*1e-6,otlev);
75     hold on;
76     [cs h3] = contour(grd.latg,-grd.zgpsi,pacific_psi'*1e-6,[0 0]);
77     clh3 = clabel(cs);
78     hold off
79     caxis([-1 1]*max(abs(pacific_psi(:)))*1.e-6); colorbar('h');
80     title('pacific overturning streamfunction [Sv]')
81     if ~isempty([h1;h2;h3])
82     set([h1;h2;h3],'LineWidth',2,'EdgeColor','k');
83     end
84     clh = [clh1;clh2;clh3];
85     if ~isempty(clh)
86     set(clh(2:2:end),'FontSize',8);
87     end
88     % $$$ [cs h] = contourf(grd.long,grd.latg,baro_psi'*1e-6,20);
89     % $$$ if ~isempty(h);
90     % $$$ set(h,'edgecolor','none');
91     % $$$ end;
92     % $$$ axis image;
93     % $$$ caxis([-1 1]*max(abs(baro_psi(:)))*1.e-6); colorbar('h');
94     % $$$ title('global barotropic stream function [Sv]')
95     bstlev = [-200:20:200];
96    
97     sh(4) = subplot(2,2,4);
98     imagesc(grd.long,grd.latg,baro_psi'*1e-6);
99     hold on;
100     [cs h ]=contour(grd.long,grd.latg,baro_psi'*1e-6,bstlev);
101     set(h,'edgecolor','k')
102     if ~isempty(h);
103     clh = clabel(cs,h);
104     set(clh,'Fontsize',8);
105     end
106     hold off
107     axis image, axis xy;
108     caxis([-1 1]*max(abs(baro_psi(:)))*1.e-6); colorbar('h');
109     title('global barotropic stream function [Sv]')
110     suptitle(['experiment ' dname ', timestep = ' num2str(timesteps(k)) ...
111     ', ' tuname ' = ' num2str(tim(k))])
112     set(sh,'layer','top')
113    
114     clear addlayer

  ViewVC Help
Powered by ViewVC 1.1.22