/[MITgcm]/MITgcm_contrib/gael/matlab_class/gcmfaces_maps/m_map_gcmfaces.m
ViewVC logotype

Annotation of /MITgcm_contrib/gael/matlab_class/gcmfaces_maps/m_map_gcmfaces.m

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


Revision 1.2 - (hide annotations) (download)
Tue Jun 21 21:23:25 2011 UTC (14 years ago) by gforget
Branch: MAIN
Changes since 1.1: +3 -0 lines
-add checks that m_map is in path

1 gforget 1.1 function []=m_map_gcmfaces(fld,varargin);
2    
3 gforget 1.2 %check that m_map is in the path
4     aa=which('m_proj'); if isempty(aa); error('this function requires m_map that is missing'); end;
5    
6 gforget 1.1 global mygrid;
7    
8     if nargin>1; choicePlot=varargin{1}; else; choicePlot=0; end;
9     if nargin>2; cc=varargin{2}; else; cc=[]; end;
10     if nargin>3; doPlotCoast=varargin{3}; else; doPlotCoast=1; end;
11    
12     if choicePlot==-1;
13     %%m_proj('Miller Cylindrical','lat',[-90 90]);
14     %%m_proj('Equidistant cylindrical','lat',[-90 90]);
15     m_proj('mollweide','lon',[-180 180],'lat',[-80 80]);
16     %m_proj('mollweide','lon',[-50 50],'lat',[20 60]);
17     [xx,yy,z]=convert2pcol(mygrid.XC,mygrid.YC,fld);
18     [x,y]=m_ll2xy(xx,yy);
19    
20     pcolor(x,y,z); shading flat; if ~isempty(cc); caxis(cc); end; colorbar;
21     if doPlotCoast; m_coast('patch',[1 1 1]*.7,'edgecolor','none'); end; m_grid;
22     end;%if choicePlot==0|choicePlot==1;
23    
24     if choicePlot==0; subplot(2,1,1); end;
25     if choicePlot==0|choicePlot==1;
26     m_proj('Mercator','lat',[-70 70]);
27     [xx,yy,z]=convert2pcol(mygrid.XC,mygrid.YC,fld);
28     [x,y]=m_ll2xy(xx,yy);
29    
30     pcolor(x,y,z); shading flat; if ~isempty(cc); caxis(cc); end; colorbar;
31     if doPlotCoast; m_coast('patch',[1 1 1]*.7,'edgecolor','none'); end; m_grid;
32     end;%if choicePlot==0|choicePlot==1;
33    
34     if choicePlot==0; subplot(2,2,3); end;
35     if choicePlot==0|choicePlot==2;
36     m_proj('Stereographic','lon',0,'lat',90,'rad',40);
37     xx=convert2arctic(mygrid.XC);
38     yy=convert2arctic(mygrid.YC);
39     z=convert2arctic(fld);
40     [x,y]=m_ll2xy(xx,yy);
41    
42     pcolor(x,y,z); shading flat; if ~isempty(cc); caxis(cc); end; colorbar;
43     if doPlotCoast; m_coast('patch',[1 1 1]*.7,'edgecolor','none'); end; m_grid;
44     end;%if choicePlot==0|choicePlot==1;
45    
46     if choicePlot==0; subplot(2,2,4); end;
47     if choicePlot==0|choicePlot==3;
48     m_proj('Stereographic','lon',0,'lat',-90,'rad',40);
49     xx=convert2southern(mygrid.XC);
50     yy=convert2southern(mygrid.YC);
51     z=convert2southern(fld);
52     [x,y]=m_ll2xy(xx,yy);
53    
54     pcolor(x,y,z); shading flat; if ~isempty(cc); caxis(cc); end; colorbar;
55     if doPlotCoast; m_coast('patch',[1 1 1]*.7,'edgecolor','none'); end; m_grid;
56     end;%if choicePlot==0|choicePlot==1;
57    
58    
59    

  ViewVC Help
Powered by ViewVC 1.1.22