/[MITgcm]/MITgcm_contrib/gmaze_pv/visu/eg_view_Timeserie_pl2.m
ViewVC logotype

Annotation of /MITgcm_contrib/gmaze_pv/visu/eg_view_Timeserie_pl2.m

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


Revision 1.1 - (hide annotations) (download)
Fri Oct 6 19:02:10 2006 UTC (19 years, 2 months ago) by gmaze
Branch: MAIN
CVS Tags: HEAD
update visu

1 gmaze 1.1 %DEF All components of the relative vorticity
2    
3     % Map projection:
4     m_proj('mercator','long',subdomain.limlon,'lat',subdomain.limlat);
5     %m_proj('mercator','long',subdomain2.limlon,'lat',subdomain2.limlat);
6     %m_proj('mercator','long',subdomain.limlon,'lat',[25 40]);
7     %m_proj('mercator','long',[subdomain.limlon(1) 360-24],'lat',[25 50]);
8    
9     % Which variables to plot:
10     wvar = [1:3];
11     iz = 2; % Surface
12     %iz = 6; % Core of the Gulf Stream
13     %iz = 22; % Under the Gulf Stream
14    
15     figure(12);clf;hold on;iw=1;jw=length(wvar);
16    
17     for ip = 1 : length(wvar)
18    
19     % Variables loop:
20     % Default:
21     CBAR = 'h'; % Colorbar orientation
22     Tcontour = [17 19]; Tcolor = [0 0 0]; % Theta contours
23     Hcontour = -[0:200:600]; Hcolor = [0 0 0]; % MLD contours
24     unit = ''; % Default unit
25     load mapanom2 ; N = 256; c = [0 0]; cmap = jet; % Colormaping
26     showT = 1; % Iso-Theta contours
27     showW = 0; % Windstress arrows
28     showH = 0; colorW = 'w'; % Mixed Layer Depth
29     showCLIM = 0; % Show CLIMODE region box
30     CONT = 0; % Contours instead of pcolor
31     CONTshlab = 0; % Show label for contours plot
32     colorCOAST = [0 0 0]; % Land color
33     SHADE = 'flat'; % shading option
34    
35     N = 32;
36     c = [12 30];
37     cx = [-(1+2*c(1)) 1+2*c(2)]*6e-5; cmap = mapanom;
38     titf = 'OMEGA';
39    
40     switch wvar(ip)
41     case 1
42     C = -squeeze(OX(iz,:,:));
43     Clon = OXlon; Clat = OXlat;
44     tit = strcat('\omega_x = - \partial v / \partial z');
45     showW = 0; % Windstress
46     showH = 0;
47     showCLIM = 1;
48     unit = '1/s';
49     case 2
50     C = -squeeze(OY(iz,:,:));
51     Clon = OYlon; Clat = OYlat;
52     tit = strcat('\omega_y = \partial u / \partial z');
53     showW = 0; % Windstress
54     showH = 0;
55     showCLIM = 1;
56     %N = 256;
57     %c = [10 10];
58     %cx = [-(1+2*c(1)) 1+2*c(2)]*6e-5; cmap = mapanom;
59     unit = '1/s';
60     case 3
61     C = squeeze(ZETA(iz,:,:));
62     Clon = ZETAlon; Clat = ZETAlat;
63     tit = strcat('\zeta = \partial v / \partial x - \partial u / \partial y');
64     showW = 0; % Windstress
65     showH = 0;
66     showCLIM = 1;
67     %N = 256;
68     %c = [10 10];
69     %cx = [-(1+2*c(1)) 1+2*c(2)]*6e-5; cmap = mapanom;
70     unit = '1/s';
71     end %switch what to plot
72    
73    
74     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
75     % Draw variable:
76     sp=subplot(iw,jw,ip);hold on
77     if CONT ~= 1
78     m_pcolor(Clon,Clat,C);
79     shading(SHADE);
80     colormap(logcolormap(N,c(1),c(2),cmap));
81     else
82     [cs,h] = m_contourf(Clon,Clat,C,CONTv);
83     colormap(mycolormap(logcolormap(N,c(1),c(2),cmap),length(CONTv)));
84     if CONTshlab
85     clabel(cs,h,'labelspacing',200,'fontsize',8)
86     end
87     end
88     caxis(cx);
89     if ip == 2
90     ccol = colorbar(CBAR,'fontsize',10);
91     ctitle(ccol,unit);
92     posiC = get(ccol,'position');
93     set(ccol,'position',[.2 posiC(2) 1-2*.2 .02]);
94     end
95     title(tit);
96     m_coast('patch',colorCOAST);
97     m_grid('xtick',360-[20:5:80],'ytick',[20:2:50]);
98     set(gcf,'name',titf);
99    
100    
101     if showT
102     [cs,h] = m_contour(Tlon,Tlat,squeeze(T(1,:,:)),Tcontour);
103     clabel(cs,h,'fontsize',8,'color',[0 0 0],'labelspacing',200);
104     for ih=1:length(h)
105     set(h(ih),'edgecolor',Tcolor,'linewidth',1);
106     end
107     end %if show THETA contours
108    
109     if showW
110     dx = 10*diff(Txlon(1:2)); dy = 8*diff(Txlat(1:2));
111     dx = 20*diff(Txlon(1:2)); dy = 10*diff(Txlat(1:2));
112     lo = [Txlon(1):dx:Txlon(length(Txlon))];
113     la = [Txlat(1):dy:Txlat(length(Txlat))];
114     [lo la] = meshgrid(lo,la);
115     Txn = interp2(Txlat,Txlon,Tx',la,lo);
116     Tyn = interp2(Txlat,Txlon,Ty',la,lo);
117     s = 2;
118     m_quiver(lo,la,Txn,Tyn,s,colorW,'linewidth',1.25);
119     % m_quiver(lo,la,-(1+sin(la*pi/180)).*Txn,(1+sin(la*pi/180)).*Tyn,s,'w');
120     m_quiver(360-84,47,1,0,s,'w','linewidth',1.25);
121     m_text(360-84,48,'1 N/m^2','color','w');
122     end %if show windstress
123    
124     if showH
125     %[cs,h] = m_contour(MLDlon,MLDlat,MLD,Hcontour);
126     cm = flipud(mycolormap(jet,length(Hcontour)));
127     cm = mycolormap([linspace(0,0,20); linspace(1,.5,20) ;linspace(0,0,20)]',length(Hcontour));
128     cm = [0 1 0 ; 0 .6 0 ; 0 .2 0 ; 0 0 0];
129     for ii = 1 : length(Hcontour)
130     [cs,h] = m_contour(MLDlon,MLDlat,MLD,[1 1]*Hcontour(ii));
131     if ~isempty(cs)
132     % clabel(cs,h,'fontsize',8,'color',[0 0 0],'labelspacing',300);
133     clabel(cs,h,'fontsize',8,'color',cm(ii,:),'labelspacing',600,'fontweight','bold');
134     for ih=1:length(h)
135     % set(h(ih),'edgecolor',Hcolor,'linewidth',1);
136     set(h(ih),'edgecolor',cm(ii,:),'linewidth',1.2);
137     end
138     end
139     end
140     end %if show Mixed Layer depth
141    
142     if showCLIM
143     m_line(360-[71 62 62 71 71],[36 36 40.5 40.5 36],'color','r','linewidth',1.5)
144     end
145    
146     %suptitle(strcat('Relative vorticity component at depth:',num2str(OYdpt(iz)),'m'));
147    
148    
149     end %for ip
150     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
151    
152     if 1 % Show the date in big in the upper left corner
153     spp=subplot('position',[0 .95 .25 .05]);
154     p=patch([0 1 1 0],[0 0 1 1],'w');
155     set(spp,'ytick',[],'xtick',[]);
156     set(spp,'box','off');
157     text(0.1,.5,num2str(TIME(it,:)),'fontsize',16,...
158     'fontweight','bold','color','r','verticalalign','middle');
159     end
160    
161    
162     %%%%%%%%%%%%%%%%
163     drawnow
164     set(gcf,'position',[4 48 888 430]);
165     videotimeline(num2str(zeros(size(TIME,1),1)),it,'b')
166     %videotimeline(TIME,it,'b')
167     if prtimg
168     set(gcf,'color','white')
169     set(findobj('tag','m_grid_color'),'facecolor','none')
170     set(gcf,'paperposition',[0.6 6.5 25 14]);
171     exportj(gcf,1,strcat(outimg,sla,titf,'.',snapshot));
172     end %if
173    

  ViewVC Help
Powered by ViewVC 1.1.22