1 |
|
|
2 |
choiceGrid='v4'; |
%to load the ECCO v4 / LLC90 grid: |
3 |
|
% nF=5; |
4 |
%need to replace the missing v3 files... |
% fileFormat='compact'; |
5 |
|
% dirGrid=fullfile([myenv.gcmfaces_dir '../']); |
6 |
|
% dirGrid=fullfile(dirGrid,'GRID/'); |
7 |
% |
% |
8 |
%choose grid for test |
%to instead load e.g. your MITgcm lat-lon grid, |
9 |
% fprintf('\n Please set the demo grid : \n'); |
%you would edit the example routines to look like: |
10 |
% fprintf(' ''llc'': lat-lon-cap grid (5 faces). \n'); |
% nF=1; |
11 |
% fprintf(' ''ll'' : simple lat-lon grid (1 face). \n'); |
% fileFormat='straight'; |
12 |
% choiceGrid=input(' and type return. ''llc'' is the default.\n'); |
% dirGrid='./'; |
|
% if isempty(choiceGrid); choiceGrid='llc'; end; |
|
|
% if strcmp(choiceGrid,'llc'); choiceGrid='v4'; |
|
|
% elseif strcmp(choiceGrid,'ll'); choiceGrid='v3'; |
|
|
% else; error('wrong grid choice'); |
|
|
% end; |
|
13 |
|
|
14 |
%choose verbise level |
%choose verbise level |
15 |
fprintf('\n Please set the amount of explanatory text display :\n'); |
fprintf('\n Please set the amount of explanatory text display :\n'); |
22 |
|
|
23 |
%initialize environment variables and mygrid |
%initialize environment variables and mygrid |
24 |
addpath gcmfaces; |
addpath gcmfaces; |
25 |
gcmfaces_global; |
gcmfaces_global; |
26 |
|
myenv.issueWarnings=0; |
27 |
myenv.verbose=verbose; |
myenv.verbose=verbose; |
28 |
if myenv.verbose>0; |
if myenv.verbose>0; |
29 |
gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global'); |
gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global'); |
30 |
end; |
end; |
31 |
|
|
32 |
|
addpath MITprof; |
33 |
if ~isempty(which('MITprof_global')); |
if ~isempty(which('MITprof_global')); |
34 |
MITprof_global; |
MITprof_global; |
35 |
if myenv.verbose>0; |
if myenv.verbose>0; |
38 |
end; |
end; |
39 |
|
|
40 |
fprintf('\n\n'); |
fprintf('\n\n'); |
41 |
gcmfaces_msg('/////////////////////////////////////////'); |
gcmfaces_msg('/////////////////////////////////////'); |
42 |
gcmfaces_msg('demo of transport computations','// PART 1 :'); |
gcmfaces_msg('demo of plotting routines','// PART 1 :'); |
43 |
gcmfaces_msg('please hit return','// >> '); |
gcmfaces_msg('please hit return','// >> '); |
44 |
gcmfaces_msg('/////////////////////////////////////////'); |
gcmfaces_msg('/////////////////////////////////////'); |
45 |
fprintf('\n\n'); |
fprintf('\n\n'); |
46 |
pause; |
pause; |
47 |
diags=example_transports(choiceGrid); |
plot_one_field; |
|
if ~isempty(diags); |
|
|
example_transports_disp(diags); |
|
|
end; |
|
48 |
|
|
49 |
fprintf('\n\n'); |
fprintf('\n\n'); |
50 |
gcmfaces_msg('/////////////////////////////////////'); |
gcmfaces_msg('///////////////////////////////////////////'); |
51 |
gcmfaces_msg('demo of plotting routines','// PART 2 :'); |
gcmfaces_msg('demo of gridding v interpolating','// PART 2 :'); |
52 |
gcmfaces_msg('please hit return','// >> '); |
gcmfaces_msg('please hit return','// >> '); |
53 |
gcmfaces_msg('/////////////////////////////////////'); |
gcmfaces_msg('///////////////////////////////////////////'); |
54 |
fprintf('\n\n'); |
fprintf('\n\n'); |
55 |
pause; |
pause; |
56 |
plot_one_field(choiceGrid,0);%%incl. call to m_map_gcmfaces; |
example_bin_average(1);%incl. call to example_smooth.m; |
57 |
|
example_griddata; |
58 |
|
example_interp; |
59 |
|
example_faces2latlon2faces; |
60 |
|
|
61 |
fprintf('\n\n'); |
fprintf('\n\n'); |
62 |
gcmfaces_msg('///////////////////////////////////////////'); |
gcmfaces_msg('/////////////////////////////////////////'); |
63 |
gcmfaces_msg('demo of gridding v interpolating','// PART 3 :'); |
gcmfaces_msg('demo of transport computations','// PART 3 :'); |
64 |
gcmfaces_msg('please hit return','// >> '); |
gcmfaces_msg('please hit return','// >> '); |
65 |
gcmfaces_msg('///////////////////////////////////////////'); |
gcmfaces_msg('/////////////////////////////////////////'); |
66 |
fprintf('\n\n'); |
fprintf('\n\n'); |
67 |
pause; |
pause; |
68 |
example_bin_average(choiceGrid,1);%incl. call to example_smooth.m; |
diags=example_transports; |
69 |
example_griddata(choiceGrid); |
if ~isempty(diags); |
70 |
example_interp(choiceGrid); |
example_transports_disp(diags); |
71 |
example_faces2latlon2faces(choiceGrid); |
end; |
72 |
|
|
73 |
fprintf('\n\n'); |
fprintf('\n\n'); |
74 |
gcmfaces_msg('/////////////////////////////////////////'); |
gcmfaces_msg('/////////////////////////////////////////'); |
77 |
gcmfaces_msg('/////////////////////////////////////////'); |
gcmfaces_msg('/////////////////////////////////////////'); |
78 |
fprintf('\n\n'); |
fprintf('\n\n'); |
79 |
pause; |
pause; |
80 |
example_budget(choiceGrid); |
example_budget; |
81 |
|
|