/[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.8 - (show annotations) (download)
Fri Mar 20 14:32:54 2015 UTC (10 years, 4 months ago) by gforget
Branch: MAIN
Changes since 1.7: +17 -18 lines
- introduce myenv.issueWarnings switch
- change ordering of example calls

1
2 choiceGrid='v4';
3
4 %old option that eventually should be re-activated:
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
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 %initialize environment variables and mygrid
25 addpath gcmfaces;
26 gcmfaces_global;
27 myenv.issueWarnings=0;
28 myenv.verbose=verbose;
29 if myenv.verbose>0;
30 gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global');
31 end;
32
33 addpath MITprof;
34 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 fprintf('\n\n');
42 gcmfaces_msg('/////////////////////////////////////');
43 gcmfaces_msg('demo of plotting routines','// PART 1 :');
44 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
50 fprintf('\n\n');
51 gcmfaces_msg('///////////////////////////////////////////');
52 gcmfaces_msg('demo of gridding v interpolating','// PART 2 :');
53 gcmfaces_msg('please hit return','// >> ');
54 gcmfaces_msg('///////////////////////////////////////////');
55 fprintf('\n\n');
56 pause;
57 example_bin_average(choiceGrid,1);%incl. call to example_smooth.m;
58 example_griddata(choiceGrid);
59 example_interp(choiceGrid);
60 example_faces2latlon2faces(choiceGrid);
61
62 fprintf('\n\n');
63 gcmfaces_msg('/////////////////////////////////////////');
64 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 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

  ViewVC Help
Powered by ViewVC 1.1.22