/[MITgcm]/MITgcm_contrib/gael/matlab_class/gcmfaces_demo.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/matlab_class/gcmfaces_demo.m

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


Revision 1.13 - (show annotations) (download)
Sun Jan 24 15:12:33 2016 UTC (9 years, 5 months ago) by gforget
Branch: MAIN
Changes since 1.12: +30 -9 lines
- improve comment displays and add help section in example_smooth
- move example_smooth call from example_bin_average.m to gcmfaces_demo

1
2 %call sequence:
3 %
4 % addpath gcmfaces; gcmfaces_demo;
5 %
6 %expected directory structure:
7 %
8 % gcmfaces (codes)
9 % MITprof (codes)
10 % nctiles_grid (ECCO v4 grid)
11 % release1 (ECCO v4 output)
12 % sample_input (test material)
13 %
14 %to activate example_remap:
15 %
16 % mkdir sample_input
17 % wget ftp://mit.ecco-group.org/gforget/testcase_remap.mat
18 % mv testcase_remap.mat sample_input/.
19 %
20 %to activate example_transports:
21 %
22 % mkdir release1
23 % wget --recursive ftp://mit.ecco-group.org/ecco_for_las/version_4/release1/nctiles_climatology
24 % mv mit.ecco-group.org/gforget/nctiles_climatology release1/.
25 % rm -rf mit.ecco-group.org
26 %
27 %to activate example_budget:
28 %
29 % wget --recursive ftp://mit.ecco-group.org/gforget/nctiles_budget_2d
30 % mv mit.ecco-group.org/gforget/nctiles_budget_2d sample_input/.
31 % rm -rf mit.ecco-group.org
32 %
33
34 %choose verbose level
35 fprintf('\n Please set the amount of explanatory text display :\n');
36 fprintf(' 0: none.\n');
37 fprintf(' 1: comments.\n');
38 fprintf(' 2: comments preceeded with calling sequence.\n');
39 fprintf(' 3: same as 2, but preceeded with pause.\n');
40 verbose=input(' and/or type return. 0 is the default. \n');
41 if isempty(verbose); verbose=0; end;
42
43 %initialize environment variables and mygrid
44 addpath gcmfaces;
45 gcmfaces_global;
46 myenv.issueWarnings=0;
47 myenv.verbose=verbose;
48 if myenv.verbose>0;
49 gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global');
50 end;
51
52 addpath MITprof;
53 if ~isempty(which('MITprof_global'));
54 MITprof_global;
55 if myenv.verbose>0;
56 gcmfaces_msg('* set MITprof path by calling MITprof_global');
57 end;
58 end;
59
60 fprintf('\n\n');
61 gcmfaces_msg('/////////////////////////////////////');
62 gcmfaces_msg('demo of plotting routines','// PART 1 :');
63 gcmfaces_msg('please hit return','// >> ');
64 gcmfaces_msg('/////////////////////////////////////');
65 fprintf('\n\n');
66 pause;
67 example_display;
68
69 fprintf('\n\n');
70 gcmfaces_msg('///////////////////////////////////////////');
71 gcmfaces_msg('demo of remapping ','// PART 2 :');
72 gcmfaces_msg('please hit return','// >> ');
73 gcmfaces_msg('///////////////////////////////////////////');
74 fprintf('\n\n');
75 pause;
76 example_remap(0);
77
78 fprintf('\n\n');
79 gcmfaces_msg('///////////////////////////////////////////');
80 gcmfaces_msg('demo of bin averaging (gridding)','// PART 2 :');
81 gcmfaces_msg('please hit return','// >> ');
82 gcmfaces_msg('///////////////////////////////////////////');
83 fprintf('\n\n');
84 pause;
85 %alternatives
86 %example_griddata;
87 %example_interp;
88 %example_faces2latlon2faces;
89 fld=example_bin_average;
90
91 fprintf('\n\n');
92 gcmfaces_msg('///////////////////////////////////////////');
93 gcmfaces_msg('demo of smoothing ','// PART 2 :');
94 gcmfaces_msg('please hit return','// >> ');
95 gcmfaces_msg('///////////////////////////////////////////');
96 fprintf('\n\n');
97 pause;
98 example_smooth(fld);
99
100 fprintf('\n\n');
101 gcmfaces_msg('/////////////////////////////////////////');
102 gcmfaces_msg('demo of transport computations','// PART 3 :');
103 gcmfaces_msg('please hit return','// >> ');
104 gcmfaces_msg('/////////////////////////////////////////');
105 fprintf('\n\n');
106 pause;
107 diags=example_transports;
108
109 if ~isempty(diags);
110 fprintf('\n\n');
111 gcmfaces_msg('/////////////////////////////////////////');
112 gcmfaces_msg('demo of transport display','// PART 3 :');
113 gcmfaces_msg('please hit return','// >> ');
114 gcmfaces_msg('/////////////////////////////////////////');
115 fprintf('\n\n');
116 example_transports_disp(diags);
117 end;
118
119 fprintf('\n\n');
120 gcmfaces_msg('/////////////////////////////////////////');
121 gcmfaces_msg('demo of budget computations','// PART 4 :');
122 gcmfaces_msg('please hit return','// >> ');
123 gcmfaces_msg('/////////////////////////////////////////');
124 fprintf('\n\n');
125 pause;
126 example_budget;
127

  ViewVC Help
Powered by ViewVC 1.1.22