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

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

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


Revision 1.8 - (hide annotations) (download)
Fri Mar 20 14:32:54 2015 UTC (10 years, 3 months ago) by gforget
Branch: MAIN
Changes since 1.7: +17 -18 lines
- introduce myenv.issueWarnings switch
- change ordering of example calls

1 gforget 1.1
2 gforget 1.5 choiceGrid='v4';
3    
4 gforget 1.8 %old option that eventually should be re-activated:
5 gforget 1.5 % fprintf('\n Please set the demo grid : \n');
6     % fprintf(' ''llc'': lat-lon-cap grid (5 faces). \n');
7     % fprintf(' ''ll'' : simple lat-lon grid (1 face). \n');
8     % choiceGrid=input(' and type return. ''llc'' is the default.\n');
9     % if isempty(choiceGrid); choiceGrid='llc'; end;
10     % if strcmp(choiceGrid,'llc'); choiceGrid='v4';
11     % elseif strcmp(choiceGrid,'ll'); choiceGrid='v3';
12     % else; error('wrong grid choice');
13     % end;
14 gforget 1.3
15     %choose verbise level
16     fprintf('\n Please set the amount of explanatory text display :\n');
17     fprintf(' 0: none.\n');
18     fprintf(' 1: comments.\n');
19     fprintf(' 2: comments preceeded with calling sequence.\n');
20     fprintf(' 3: same as 2, but preceeded with pause.\n');
21     verbose=input(' and/or type return. 0 is the default. \n');
22     if isempty(verbose); verbose=0; end;
23    
24 gforget 1.2 %initialize environment variables and mygrid
25 gforget 1.6 addpath gcmfaces;
26 gforget 1.8 gcmfaces_global;
27     myenv.issueWarnings=0;
28 gforget 1.3 myenv.verbose=verbose;
29     if myenv.verbose>0;
30     gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global');
31     end;
32 gforget 1.1
33 gforget 1.7 addpath MITprof;
34 gforget 1.6 if ~isempty(which('MITprof_global'));
35     MITprof_global;
36     if myenv.verbose>0;
37     gcmfaces_msg('* set MITprof path by calling MITprof_global');
38     end;
39     end;
40    
41 gforget 1.5 fprintf('\n\n');
42     gcmfaces_msg('/////////////////////////////////////');
43 gforget 1.8 gcmfaces_msg('demo of plotting routines','// PART 1 :');
44 gforget 1.5 gcmfaces_msg('please hit return','// >> ');
45     gcmfaces_msg('/////////////////////////////////////');
46     fprintf('\n\n');
47     pause;
48     plot_one_field(choiceGrid,0);%%incl. call to m_map_gcmfaces;
49 gforget 1.1
50 gforget 1.5 fprintf('\n\n');
51     gcmfaces_msg('///////////////////////////////////////////');
52 gforget 1.8 gcmfaces_msg('demo of gridding v interpolating','// PART 2 :');
53 gforget 1.5 gcmfaces_msg('please hit return','// >> ');
54     gcmfaces_msg('///////////////////////////////////////////');
55     fprintf('\n\n');
56     pause;
57 gforget 1.1 example_bin_average(choiceGrid,1);%incl. call to example_smooth.m;
58     example_griddata(choiceGrid);
59     example_interp(choiceGrid);
60 gforget 1.4 example_faces2latlon2faces(choiceGrid);
61 gforget 1.1
62 gforget 1.6 fprintf('\n\n');
63     gcmfaces_msg('/////////////////////////////////////////');
64 gforget 1.8 gcmfaces_msg('demo of transport computations','// PART 3 :');
65     gcmfaces_msg('please hit return','// >> ');
66     gcmfaces_msg('/////////////////////////////////////////');
67     fprintf('\n\n');
68     pause;
69     diags=example_transports(choiceGrid);
70     if ~isempty(diags);
71     example_transports_disp(diags);
72     end;
73    
74     fprintf('\n\n');
75     gcmfaces_msg('/////////////////////////////////////////');
76 gforget 1.6 gcmfaces_msg('demo of budget computations','// PART 4 :');
77     gcmfaces_msg('please hit return','// >> ');
78     gcmfaces_msg('/////////////////////////////////////////');
79     fprintf('\n\n');
80     pause;
81     example_budget(choiceGrid);
82 gforget 1.1

  ViewVC Help
Powered by ViewVC 1.1.22