/[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.1 - (hide annotations) (download)
Sun May 2 21:22:14 2010 UTC (15 years, 2 months ago) by gforget
Branch: MAIN
routines that do the interface to m_map

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

  ViewVC Help
Powered by ViewVC 1.1.22