/[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.5 - (hide annotations) (download)
Fri Apr 30 06:19:33 2010 UTC (16 years, 6 months ago) by gforget
Branch: MAIN
Changes since 1.4: +1 -1 lines
changing the sample input data directory name from
matlab_class_material to sample_input

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

  ViewVC Help
Powered by ViewVC 1.1.22