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

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

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


Revision 1.3 - (hide annotations) (download)
Thu Oct 20 20:56:24 2011 UTC (13 years, 8 months ago) by gforget
Branch: MAIN
Changes since 1.2: +25 -4 lines
- add interactive choice of grid, and start printing
  messages to screen (if myenv.verbose>0).

1 gforget 1.1
2 gforget 1.3 %choose grid for test
3     fprintf('\n Please set the demo grid : \n');
4     fprintf(' ''llc'': lat-lon-cap grid (5 faces). \n');
5     fprintf(' ''ll'' : simple lat-lon grid (1 face). \n');
6     choiceGrid=input(' and type return. ''llc'' is the default.\n');
7     if isempty(choiceGrid); choiceGrid='llc'; end;
8     if strcmp(choiceGrid,'llc'); choiceGrid='v4';
9     elseif strcmp(choiceGrid,'ll'); choiceGrid='v3';
10     else; error('wrong grid choice');
11     end;
12    
13     %choose verbise level
14     fprintf('\n Please set the amount of explanatory text display :\n');
15     fprintf(' 0: none.\n');
16     fprintf(' 1: comments.\n');
17     fprintf(' 2: comments preceeded with calling sequence.\n');
18     fprintf(' 3: same as 2, but preceeded with pause.\n');
19     verbose=input(' and/or type return. 0 is the default. \n');
20     if isempty(verbose); verbose=0; end;
21    
22 gforget 1.2 %initialize environment variables and mygrid
23 gforget 1.3 gcmfaces_global;
24     myenv.verbose=verbose;
25     if myenv.verbose>0;
26     gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global');
27     end;
28 gforget 1.1
29     basic_diags_compute_v3_or_v4(choiceGrid);
30     basic_diags_display_v3_or_v4(choiceGrid);
31    
32     example_bin_average(choiceGrid,1);%incl. call to example_smooth.m;
33     example_griddata(choiceGrid);
34     example_interp(choiceGrid);
35    
36     plot_one_field(choiceGrid,0);%%incl. call to m_map_gcmfaces;
37    
38    

  ViewVC Help
Powered by ViewVC 1.1.22