/[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.17 - (hide annotations) (download)
Sun Jan 24 13:29:47 2016 UTC (10 years, 9 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +0 -0 lines
FILE REMOVED
- rename plot_one_field and plot_std_field as example_display and example_IO

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 gforget 1.15 %expected location:
20 gforget 1.14 myenv.nctilesdir=fullfile(pwd,'/release1/nctiles_climatology/ETAN/');
21 gforget 1.15 %if ETAN is not found then try old location:
22     if ~isdir(myenv.nctilesdir);
23     %if not found then try old location:
24     tmpdir=fullfile(pwd,'/gcmfaces/sample_input/nctiles_climatology/ETAN/');
25     if isdir(tmpdir); myenv.nctilesdir=tmpdir; end;
26     end;
27     %if ETAN is still not found then issue warning and skip plot_std_field
28 gforget 1.12 if ~isdir(myenv.nctilesdir);
29 gforget 1.14 help plot_std_field;
30     warning('plot_std_field requires release1/nctiles_climatology/ETAN that was not found ---> abort!');
31 gforget 1.12 return;
32 gforget 1.11 end;
33    
34 gforget 1.14 %%%%%%%%%%%%%%%%%
35     %load grid:
36     %%%%%%%%%%%%%%%%%
37    
38     mygrid=[];
39     if isempty(mygrid);
40     grid_load;
41     end;
42 gforget 1.1
43     %%%%%%%%%%%
44     %get field:
45     %%%%%%%%%%%
46 gforget 1.14 fld=read_nctiles([myenv.nctilesdir 'ETAN'],'ETAN');
47 gforget 1.11 fld=std(fld,[],3); fld(find(fld==0))=NaN;
48     cc=[0:0.1:1]*0.10;
49    
50 gforget 1.1 %%%%%%%%%%%%
51     %plot field:
52     %%%%%%%%%%%%
53 gforget 1.10 if ~myenv.lessplot;
54 gforget 1.16 figureL; gcmfaces_sphere(fld,cc,[],[],1);
55 gforget 1.10 end;
56 gforget 1.1
57    

  ViewVC Help
Powered by ViewVC 1.1.22