/[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.14 - (hide annotations) (download)
Mon Jan 11 17:29:58 2016 UTC (10 years, 10 months ago) by gforget
Branch: MAIN
Changes since 1.13: +28 -13 lines
- revise handing of path, grid and input files, warnings and messages:

1 gforget 1.13 function []=plot_std_field();
2 gforget 1.14 %
3     %PLOT_STD_FIELD computes and displays a standard deviation field
4     %
5     %stand-alone call: addpath gcmfaces/sample_analysis/; plot_std_field;
6     %
7     %needed input files:
8     % mkdir release1
9     % wget --recursive ftp://mit.ecco-group.org/ecco_for_las/version_4/release1/nctiles_climatology/ETAN
10     % mv mit.ecco-group.org/ecco_for_las/version_4/release1/nctiles_climatology release1/.
11 gforget 1.9
12 gforget 1.14 p = genpath('gcmfaces/'); addpath(p);
13     p = genpath('MITprof/'); addpath(p);
14 gforget 1.1
15 gforget 1.10 gcmfaces_global;
16 gforget 1.12
17 gforget 1.14 input_list_check('plot_std_field',nargin);
18    
19     %- what is currently expected (using script)
20     % myenv.nctilesdir=fullfile(pwd,'/gcmfaces/sample_input/nctiles_climatology/ETAN/');
21     %- what I am about to switch to (after updating guidelines in gcmfaces.pdf)
22     myenv.nctilesdir=fullfile(pwd,'/release1/nctiles_climatology/ETAN/');
23 gforget 1.12 if ~isdir(myenv.nctilesdir);
24 gforget 1.14 help plot_std_field;
25     warning('plot_std_field requires release1/nctiles_climatology/ETAN that was not found ---> abort!');
26 gforget 1.12 return;
27 gforget 1.11 end;
28    
29 gforget 1.14 %%%%%%%%%%%%%%%%%
30     %load grid:
31     %%%%%%%%%%%%%%%%%
32    
33     mygrid=[];
34     if isempty(mygrid);
35     grid_load;
36     end;
37 gforget 1.1
38     %%%%%%%%%%%
39     %get field:
40     %%%%%%%%%%%
41 gforget 1.14 fld=read_nctiles([myenv.nctilesdir 'ETAN'],'ETAN');
42 gforget 1.11 fld=std(fld,[],3); fld(find(fld==0))=NaN;
43     cc=[0:0.1:1]*0.10;
44    
45 gforget 1.1 %%%%%%%%%%%%
46     %plot field:
47     %%%%%%%%%%%%
48 gforget 1.10 if ~myenv.lessplot;
49 gforget 1.11 gcmfaces_sphere(fld,cc,[],[],1);
50 gforget 1.10 end;
51 gforget 1.1
52    

  ViewVC Help
Powered by ViewVC 1.1.22