/[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.9 - (hide annotations) (download)
Fri Mar 20 15:41:13 2015 UTC (10 years, 3 months ago) by gforget
Branch: MAIN
Changes since 1.8: +18 -19 lines
- remove deprecated choiceGrid (or choiceV3orV4) switches and arguments

1 gforget 1.1
2 gforget 1.9 %to load the ECCO v4 / LLC90 grid:
3     % nF=5;
4     % fileFormat='compact';
5     % dirGrid=fullfile([myenv.gcmfaces_dir '../']);
6     % dirGrid=fullfile(dirGrid,'GRID/');
7     %
8     %to instead load e.g. your MITgcm lat-lon grid,
9     %you would edit the example routines to look like:
10     % nF=1;
11     % fileFormat='straight';
12     % dirGrid='./';
13 gforget 1.3
14     %choose verbise level
15     fprintf('\n Please set the amount of explanatory text display :\n');
16     fprintf(' 0: none.\n');
17     fprintf(' 1: comments.\n');
18     fprintf(' 2: comments preceeded with calling sequence.\n');
19     fprintf(' 3: same as 2, but preceeded with pause.\n');
20     verbose=input(' and/or type return. 0 is the default. \n');
21     if isempty(verbose); verbose=0; end;
22    
23 gforget 1.2 %initialize environment variables and mygrid
24 gforget 1.6 addpath gcmfaces;
25 gforget 1.8 gcmfaces_global;
26     myenv.issueWarnings=0;
27 gforget 1.3 myenv.verbose=verbose;
28     if myenv.verbose>0;
29     gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global');
30     end;
31 gforget 1.1
32 gforget 1.7 addpath MITprof;
33 gforget 1.6 if ~isempty(which('MITprof_global'));
34     MITprof_global;
35     if myenv.verbose>0;
36     gcmfaces_msg('* set MITprof path by calling MITprof_global');
37     end;
38     end;
39    
40 gforget 1.5 fprintf('\n\n');
41     gcmfaces_msg('/////////////////////////////////////');
42 gforget 1.8 gcmfaces_msg('demo of plotting routines','// PART 1 :');
43 gforget 1.5 gcmfaces_msg('please hit return','// >> ');
44     gcmfaces_msg('/////////////////////////////////////');
45     fprintf('\n\n');
46     pause;
47 gforget 1.9 plot_one_field;
48 gforget 1.1
49 gforget 1.5 fprintf('\n\n');
50     gcmfaces_msg('///////////////////////////////////////////');
51 gforget 1.8 gcmfaces_msg('demo of gridding v interpolating','// PART 2 :');
52 gforget 1.5 gcmfaces_msg('please hit return','// >> ');
53     gcmfaces_msg('///////////////////////////////////////////');
54     fprintf('\n\n');
55     pause;
56 gforget 1.9 example_bin_average(1);%incl. call to example_smooth.m;
57     example_griddata;
58     example_interp;
59     example_faces2latlon2faces;
60 gforget 1.1
61 gforget 1.6 fprintf('\n\n');
62     gcmfaces_msg('/////////////////////////////////////////');
63 gforget 1.8 gcmfaces_msg('demo of transport computations','// PART 3 :');
64     gcmfaces_msg('please hit return','// >> ');
65     gcmfaces_msg('/////////////////////////////////////////');
66     fprintf('\n\n');
67     pause;
68 gforget 1.9 diags=example_transports;
69 gforget 1.8 if ~isempty(diags);
70     example_transports_disp(diags);
71     end;
72    
73     fprintf('\n\n');
74     gcmfaces_msg('/////////////////////////////////////////');
75 gforget 1.6 gcmfaces_msg('demo of budget computations','// PART 4 :');
76     gcmfaces_msg('please hit return','// >> ');
77     gcmfaces_msg('/////////////////////////////////////////');
78     fprintf('\n\n');
79     pause;
80 gforget 1.9 example_budget;
81 gforget 1.1

  ViewVC Help
Powered by ViewVC 1.1.22