/[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.7 by gforget, Thu Feb 12 21:40:26 2015 UTC
# Line 1  Line 1 
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');
# Line 20  verbose=input(' and/or type return. 0 is Line 24  verbose=input(' and/or type return. 0 is
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;  addpath gcmfaces;
28    gcmfaces_global;
29  myenv.verbose=verbose;  myenv.verbose=verbose;
30  if myenv.verbose>0;  if myenv.verbose>0;
31      gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global');      gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global');
32  end;  end;
33    
34  basic_diags_compute_v3_or_v4(choiceGrid);  addpath MITprof;
35  basic_diags_display_v3_or_v4(choiceGrid);  if ~isempty(which('MITprof_global'));
36    MITprof_global;
37    if myenv.verbose>0;
38        gcmfaces_msg('* set MITprof path by calling MITprof_global');
39    end;
40    end;
41    
42    fprintf('\n\n');
43    gcmfaces_msg('/////////////////////////////////////////');
44    gcmfaces_msg('demo of transport computations','// PART 1 :');
45    gcmfaces_msg('please hit return','// >> ');
46    gcmfaces_msg('/////////////////////////////////////////');
47    fprintf('\n\n');
48    pause;
49    diags=example_transports(choiceGrid);
50    if ~isempty(diags);
51        example_transports_disp(diags);
52    end;
53    
54    fprintf('\n\n');
55    gcmfaces_msg('/////////////////////////////////////');
56    gcmfaces_msg('demo of plotting routines','// PART 2 :');
57    gcmfaces_msg('please hit return','// >> ');
58    gcmfaces_msg('/////////////////////////////////////');
59    fprintf('\n\n');
60    pause;
61    plot_one_field(choiceGrid,0);%%incl. call to m_map_gcmfaces;
62    
63    fprintf('\n\n');
64    gcmfaces_msg('///////////////////////////////////////////');
65    gcmfaces_msg('demo of gridding v interpolating','// PART 3 :');
66    gcmfaces_msg('please hit return','// >> ');
67    gcmfaces_msg('///////////////////////////////////////////');
68    fprintf('\n\n');
69    pause;
70  example_bin_average(choiceGrid,1);%incl. call to example_smooth.m;  example_bin_average(choiceGrid,1);%incl. call to example_smooth.m;
71  example_griddata(choiceGrid);  example_griddata(choiceGrid);
72  example_interp(choiceGrid);  example_interp(choiceGrid);
73  example_faces2latlon2faces(choiceGrid);  example_faces2latlon2faces(choiceGrid);
74    
75  plot_one_field(choiceGrid,0);%%incl. call to m_map_gcmfaces;  fprintf('\n\n');
76    gcmfaces_msg('/////////////////////////////////////////');
77    gcmfaces_msg('demo of budget computations','// PART 4 :');
78    gcmfaces_msg('please hit return','// >> ');
79    gcmfaces_msg('/////////////////////////////////////////');
80    fprintf('\n\n');
81    pause;
82    example_budget(choiceGrid);
83    

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

  ViewVC Help
Powered by ViewVC 1.1.22