1 |
|
|
2 |
|
choiceGrid='v4'; |
3 |
|
|
4 |
|
%need to replace the missing v3 files... |
5 |
|
% |
6 |
%choose grid for test |
%choose grid for test |
7 |
fprintf('\n Please set the demo grid : \n'); |
% fprintf('\n Please set the demo grid : \n'); |
8 |
fprintf(' ''llc'': lat-lon-cap grid (5 faces). \n'); |
% fprintf(' ''llc'': lat-lon-cap grid (5 faces). \n'); |
9 |
fprintf(' ''ll'' : simple lat-lon grid (1 face). \n'); |
% fprintf(' ''ll'' : simple lat-lon grid (1 face). \n'); |
10 |
choiceGrid=input(' and type return. ''llc'' is the default.\n'); |
% choiceGrid=input(' and type return. ''llc'' is the default.\n'); |
11 |
if isempty(choiceGrid); choiceGrid='llc'; end; |
% if isempty(choiceGrid); choiceGrid='llc'; end; |
12 |
if strcmp(choiceGrid,'llc'); choiceGrid='v4'; |
% if strcmp(choiceGrid,'llc'); choiceGrid='v4'; |
13 |
elseif strcmp(choiceGrid,'ll'); choiceGrid='v3'; |
% elseif strcmp(choiceGrid,'ll'); choiceGrid='v3'; |
14 |
else; error('wrong grid choice'); |
% else; error('wrong grid choice'); |
15 |
end; |
% end; |
16 |
|
|
17 |
%choose verbise level |
%choose verbise level |
18 |
fprintf('\n Please set the amount of explanatory text display :\n'); |
fprintf('\n Please set the amount of explanatory text display :\n'); |
24 |
if isempty(verbose); verbose=0; end; |
if isempty(verbose); verbose=0; end; |
25 |
|
|
26 |
%initialize environment variables and mygrid |
%initialize environment variables and mygrid |
27 |
gcmfaces_global; |
gcmfaces_global; |
28 |
myenv.verbose=verbose; |
myenv.verbose=verbose; |
29 |
if myenv.verbose>0; |
if myenv.verbose>0; |
30 |
gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global'); |
gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global'); |
31 |
end; |
end; |
32 |
|
|
33 |
basic_diags_compute_v3_or_v4(choiceGrid); |
fprintf('\n\n'); |
34 |
basic_diags_display_v3_or_v4(choiceGrid); |
gcmfaces_msg('/////////////////////////////////////////'); |
35 |
|
gcmfaces_msg('demo of transport computations','// PART 1 :'); |
36 |
|
gcmfaces_msg('please hit return','// >> '); |
37 |
|
gcmfaces_msg('/////////////////////////////////////////'); |
38 |
|
fprintf('\n\n'); |
39 |
|
pause; |
40 |
|
diags=example_transports(choiceGrid); |
41 |
|
if ~isempty(diags); |
42 |
|
example_transports_disp(diags); |
43 |
|
end; |
44 |
|
|
45 |
|
fprintf('\n\n'); |
46 |
|
gcmfaces_msg('/////////////////////////////////////'); |
47 |
|
gcmfaces_msg('demo of plotting routines','// PART 2 :'); |
48 |
|
gcmfaces_msg('please hit return','// >> '); |
49 |
|
gcmfaces_msg('/////////////////////////////////////'); |
50 |
|
fprintf('\n\n'); |
51 |
|
pause; |
52 |
|
plot_one_field(choiceGrid,0);%%incl. call to m_map_gcmfaces; |
53 |
|
|
54 |
|
fprintf('\n\n'); |
55 |
|
gcmfaces_msg('///////////////////////////////////////////'); |
56 |
|
gcmfaces_msg('demo of gridding v interpolating','// PART 3 :'); |
57 |
|
gcmfaces_msg('please hit return','// >> '); |
58 |
|
gcmfaces_msg('///////////////////////////////////////////'); |
59 |
|
fprintf('\n\n'); |
60 |
|
pause; |
61 |
example_bin_average(choiceGrid,1);%incl. call to example_smooth.m; |
example_bin_average(choiceGrid,1);%incl. call to example_smooth.m; |
62 |
example_griddata(choiceGrid); |
example_griddata(choiceGrid); |
63 |
example_interp(choiceGrid); |
example_interp(choiceGrid); |
64 |
example_faces2latlon2faces(choiceGrid); |
example_faces2latlon2faces(choiceGrid); |
65 |
|
|
|
plot_one_field(choiceGrid,0);%%incl. call to m_map_gcmfaces; |
|
66 |
|
|
67 |
|
|