/[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.11 - (hide annotations) (download)
Wed Dec 3 00:16:12 2014 UTC (11 years, 11 months ago) by gforget
Branch: MAIN
Changes since 1.10: +20 -11 lines
- update to use official files instead of sample_input.tar,
  add gcmfaces_sphere, retire basic_diags_compute_v3_or_v4

1 gforget 1.9 function []=plot_std_field(choiceV3orV4);
2     %object: compute and display a standard deviation field
3     %inputs: choiceV3orV4 ('v3' or 'v4') selects the sample GRID
4    
5     input_list_check('plot_std_field',nargin);
6 gforget 1.1
7 gforget 1.11
8 gforget 1.1 %%%%%%%%%%%%%%%%%
9     %load parameters:
10     %%%%%%%%%%%%%%%%%
11 gforget 1.10 gcmfaces_global;
12     dir0=[myenv.gcmfaces_dir '/sample_input/'];
13 gforget 1.11 if strcmp(choiceV3orV4,'v4');
14     nF=5;
15     fileFormat='compact';
16     dirGrid=[dir0 '../../GRID/'];
17     dirIn=[dir0 '/nctiles_climatology/'];
18     else;
19     error('files are missing');
20     nF=1;
21     fileFormat='straight';
22     dirGrid=[dir0 '/GRID' choiceV3orV4 '/'];
23     dirIn=[dir0 '/SAMPLE' choiceV3orV4 '/'];
24     end;
25    
26     mygrid=[]; grid_load(dirGrid,nF,fileFormat,1);
27 gforget 1.1
28     %%%%%%%%%%%
29     %get field:
30     %%%%%%%%%%%
31 gforget 1.11 fld=read_nctiles([dirIn 'ETAN/ETAN'],'ETAN');
32     fld=std(fld,[],3); fld(find(fld==0))=NaN;
33     cc=[0:0.1:1]*0.10;
34    
35 gforget 1.1 %%%%%%%%%%%%
36     %plot field:
37     %%%%%%%%%%%%
38 gforget 1.10 if ~myenv.lessplot;
39 gforget 1.11 gcmfaces_sphere(fld,cc,[],[],1);
40 gforget 1.10 end;
41 gforget 1.1
42    

  ViewVC Help
Powered by ViewVC 1.1.22