/[MITgcm]/MITgcm_contrib/gael/comm/course-idma2016/matlab/mitgcm_plot_held_suarez.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/comm/course-idma2016/matlab/mitgcm_plot_held_suarez.m

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


Revision 1.3 - (show annotations) (download)
Fri Jan 22 20:30:55 2016 UTC (9 years, 6 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +14 -8 lines
- revise example
- switch to gcmfaces_sphere if available

1 function []=mitgcm_plot_held_suarez(fil,cc);
2 %Example:
3 % dirExp='MITgcm/verification/tutorial_held_suarez_cs/run/';
4 % grid_load(dirExp,6,'cube');
5 % cc=[260:2:310]; suf=[dirExp 'T']; rec=1;
6 % figure; set(gcf,'Renderer','zbuffer');
7 % for tt=282240:192*30:345600;
8 % fil={sprintf('%s.%010d',suf,tt),rec};
9 % mitgcm_plot_held_suarez(fil,cc);
10 % shading interp;
11 % pause(0.1);
12 % end;
13 %
14 %note: this requires that the gcmfaces software has been
15 % installed and added to the matlab path as explained in
16 % MITgcm_contrib/gael/matlab_class/gcmfaces.pdf
17
18 typePlot=0;
19 if ~isempty(which('gcmfaces_sphere')); typePlot=1; end;
20
21 gcmfaces_global;
22
23 m=squeeze(mygrid.mskC(:,:,1));
24
25 if ~iscell(fil);
26 c=rdmds2gcmfaces(fil);
27 else;
28 c=rdmds2gcmfaces(fil{1},'rec',fil{2});
29 end;
30 c=c(:,:,1);
31
32 clf;
33 if isempty(whos('cc')); cc=[]; end;
34 if typePlot==1;
35 gcmfaces_sphere(c.*m,cc,[],[],1);
36 else;
37 qwckplot(c.*m); gcmfaces_cmap_cbar(cc);
38 end;
39 title(fil);
40

  ViewVC Help
Powered by ViewVC 1.1.22