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

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

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

revision 1.5 by gforget, Wed Nov 3 19:53:11 2010 UTC revision 1.6 by gforget, Thu Nov 4 15:22:40 2010 UTC
# Line 1  Line 1 
1    
2  global gcmfaces_verbose; gcmfaces_verbose=1;  global gcmfaces_skipplottest; %externally set key that will bypass the interactive plotting test
3    if isempty(gcmfaces_skipplottest); gcmfaces_skipplottest=0; end;
4    
5    global gcmfaces_verbose; %to print notes to screen
6    if isempty(gcmfaces_verbose); gcmfaces_verbose=1; end;
7    
8    
9  global mydir; mydir=[pwd '/'];  global mydir; mydir=[pwd '/'];
10    
# Line 20  fprintf(fid,['addpath ' mydir 'sample_an Line 25  fprintf(fid,['addpath ' mydir 'sample_an
25  fprintf(fid,['addpath ' mydir 'sample_processing/;\n']);  fprintf(fid,['addpath ' mydir 'sample_processing/;\n']);
26  fclose(fid);  fclose(fid);
27    
28    if gcmfaces_verbose;
29  fprintf('\n\n\n***********message from gcmfaces_init.m************ \n');  fprintf('\n\n\n***********message from gcmfaces_init.m************ \n');
30  fprintf(' gcmfaces_path.m was created that, when executed, \n');  fprintf(' gcmfaces_path.m was created that, when executed, \n');
31  fprintf(' adds the gcmfaces directories to your path  \n\n\n');  fprintf(' adds the gcmfaces directories to your path  \n\n\n');
32  fprintf(' ultimately you may want to copy it in your startup.m \n');  fprintf(' ultimately you may want to copy it in your startup.m \n');
33    end;
34    
35  gcmfaces_path;  gcmfaces_path;
36    
37  test0=dir('sample_input'); if isempty(test0); fprintf('no sample input data found\n'); return; end;  test0=dir('sample_input'); if isempty(test0); fprintf('no sample input data found\n'); return; end;
38    
39    fprintf('\n\n basic gcmfaces test: started... \n');
40      gcmfaces_path;
41      global mygrid; mygrid=[]; grid_load([mydir '/sample_input/GRIDv4/'],5);
42      nameFld='DDetan'; tt=[53:78]*336; cc=[0 0.10];
43      fld=rdmds2gcmfaces([mydir '/sample_input/SAMPLEv4/' nameFld],tt,5);
44      fld=std(fld,[],3); msk=mygrid.hFacC(:,:,1); fld(find(msk==0))=NaN;
45    fprintf(' basic gcmfaces test: completed. \n\n');
46    
47    if ~gcmfaces_skipplottest;
48    
49    if gcmfaces_verbose;
50  fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');  fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');
51  fprintf(' starting 1st example routine: plot_one_field ... \n');  fprintf(' starting 1st example routine: plot_one_field ... \n');
52    end;
53    
54  plot_one_field;  plot_one_field;
55    
56    if gcmfaces_verbose;
57  fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');  fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');
58  fprintf(' starting 2nd example routine: plot_std_field ... \n');  fprintf(' starting 2nd example routine: plot_std_field ... \n');
59    end;
60    
61  plot_std_field;  plot_std_field;
62    
63  fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');  end;
 fprintf(' >>> initialization of gcmfaces completed correctly \n');  
 fprintf(' >>> you are all set and may now use the gcmfaces package \n');  
 fprintf(' >>> eventually, to avoid running gcmfaces_init over again \n');  
 fprintf('  you may want to copy the gcmfaces_path.m code to your startup.m \n\n\n');  
64    
65    if gcmfaces_verbose;
66    fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');
67    fprintf(' --- initialization of gcmfaces completed correctly \n');
68    fprintf(' --- you are all set and may now use the gcmfaces package \n');
69    fprintf(' --- eventually, to avoid running gcmfaces_init over again \n');
70    fprintf(' --- you may want to copy the gcmfaces_path.m code to your startup.m \n\n\n');
71    end;
72    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22