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

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

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

revision 1.4 by gforget, Tue Jul 31 19:12:44 2012 UTC revision 1.8 by gforget, Fri Mar 20 14:32:54 2015 UTC
# Line 1  Line 1 
1    
2  %choose grid for test  choiceGrid='v4';
3  fprintf('\n Please set the demo grid : \n');  
4  fprintf('    ''llc'': lat-lon-cap grid (5 faces). \n');  %old option that eventually should be re-activated:
5  fprintf('    ''ll'' : simple lat-lon grid (1 face). \n');  % fprintf('\n Please set the demo grid : \n');
6  choiceGrid=input(' and type return. ''llc'' is the default.\n');  % fprintf('    ''llc'': lat-lon-cap grid (5 faces). \n');
7  if isempty(choiceGrid); choiceGrid='llc'; end;  % fprintf('    ''ll'' : simple lat-lon grid (1 face). \n');
8  if strcmp(choiceGrid,'llc'); choiceGrid='v4';  % choiceGrid=input(' and type return. ''llc'' is the default.\n');
9  elseif strcmp(choiceGrid,'ll'); choiceGrid='v3';  % if isempty(choiceGrid); choiceGrid='llc'; end;
10  else; error('wrong grid choice');  % if strcmp(choiceGrid,'llc'); choiceGrid='v4';
11  end;  % elseif strcmp(choiceGrid,'ll'); choiceGrid='v3';
12    % else; error('wrong grid choice');
13    % end;
14    
15  %choose verbise level  %choose verbise level
16  fprintf('\n Please set the amount of explanatory text display :\n');  fprintf('\n Please set the amount of explanatory text display :\n');
# Line 20  verbose=input(' and/or type return. 0 is Line 22  verbose=input(' and/or type return. 0 is
22  if isempty(verbose); verbose=0; end;  if isempty(verbose); verbose=0; end;
23    
24  %initialize environment variables and mygrid  %initialize environment variables and mygrid
25    addpath gcmfaces;
26  gcmfaces_global;  gcmfaces_global;
27    myenv.issueWarnings=0;
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);  addpath MITprof;
34  basic_diags_display_v3_or_v4(choiceGrid);  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;  example_bin_average(choiceGrid,1);%incl. call to example_smooth.m;
58  example_griddata(choiceGrid);  example_griddata(choiceGrid);
59  example_interp(choiceGrid);  example_interp(choiceGrid);
60  example_faces2latlon2faces(choiceGrid);  example_faces2latlon2faces(choiceGrid);
61    
62  plot_one_field(choiceGrid,0);%%incl. call to m_map_gcmfaces;  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    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22