/[MITgcm]/MITgcm_contrib/gael/matlab_class/sample_analysis/plot_std_field.m
ViewVC logotype

Annotation of /MITgcm_contrib/gael/matlab_class/sample_analysis/plot_std_field.m

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


Revision 1.8 - (hide annotations) (download)
Wed Jun 15 17:08:04 2011 UTC (15 years, 4 months ago) by gforget
Branch: MAIN
Changes since 1.7: +1 -1 lines
-  replace mydir with gcmfaces_dir and MITprof_dir accordingly.

1 gforget 1.6 clear all;
2 gforget 1.1
3     %%%%%%%%%%%%%%%%%
4     %load parameters:
5     %%%%%%%%%%%%%%%%%
6 gforget 1.7 choiceV3orV4=input('please select grid by typing ''v4'' \n (next time try ''v3'')\n');
7 gforget 1.1
8 gforget 1.2 if ~isempty(choiceV3orV4)&isempty(whos('mygrid'));
9 gforget 1.1 gcmfaces_path;
10 gforget 1.8 dir0=[gcmfaces_dir '/sample_input/'];
11 gforget 1.4 dirGrid=[dir0 '/GRID' choiceV3orV4 '/'];
12     dirIn=[dir0 '/SAMPLE' choiceV3orV4 '/'];
13 gforget 1.2 if strcmp(choiceV3orV4,'v4'); nF=5; else; nF=1; end;
14     global mygrid; mygrid=[]; grid_load(dirGrid,nF);
15 gforget 1.1 end;
16    
17     %%%%%%%%%%%
18     %get field:
19     %%%%%%%%%%%
20     nameFld='DDetan'; tt=[53:78]*336; cc=[0 0.10];
21 gforget 1.2 fld=rdmds2gcmfaces([dirIn nameFld],tt,nF);
22 gforget 1.1 fld=std(fld,[],3); msk=mygrid.hFacC(:,:,1); fld(find(msk==0))=NaN;
23    
24     %%%%%%%%%%%%
25     %plot field:
26     %%%%%%%%%%%%
27     figure; set(gcf,'Units','Normalized','Position',[0.1 0.3 0.4 0.6]);
28     [X,Y,FLD]=convert2pcol(mygrid.XC,mygrid.YC,fld);
29     pcolor(X,Y,FLD); axis([-180 180 -90 90]); shading flat; caxis(cc); colorbar;
30    
31    

  ViewVC Help
Powered by ViewVC 1.1.22