/[MITgcm]/MITgcm_contrib/ESMF/global_ocean.128x64x15/diags_matlab/mit_plotstreamfunctions.m
ViewVC logotype

Annotation of /MITgcm_contrib/ESMF/global_ocean.128x64x15/diags_matlab/mit_plotstreamfunctions.m

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


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Sun Feb 15 22:28:30 2004 UTC (21 years, 5 months ago) by cnh
Branch: MAIN, Initial
CVS Tags: adoption_1_0_pre_A, Baseline, HEAD
Changes since 1.1: +0 -0 lines
Initial checkin

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

  ViewVC Help
Powered by ViewVC 1.1.22