/[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.10 by gforget, Tue Jun 21 21:33:40 2011 UTC revision 1.11 by gforget, Fri Aug 5 22:00:03 2011 UTC
# Line 1  Line 1 
1    
2  global gcmfaces_skipplottest; %externally set key that will bypass the interactive plotting test  gcmfaces_global;
 if isempty(gcmfaces_skipplottest); gcmfaces_skipplottest=0; end;  
   
 global gcmfaces_verbose; %to print notes to screen  
 if isempty(gcmfaces_verbose); gcmfaces_verbose=1; end;  
   
   
 global gcmfaces_dir; gcmfaces_dir=[pwd '/'];  
   
 fid=fopen([gcmfaces_dir 'gcmfaces_path.m'],'wt');  
 fprintf(fid,['global gcmfaces_dir; gcmfaces_dir=''' gcmfaces_dir ''';\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir ';\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir 'gcmfaces_IO/;\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir 'gcmfaces_convert/;\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir 'gcmfaces_exch/;\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir 'gcmfaces_maps/;\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir 'gcmfaces_misc/;\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir 'gcmfaces_calc/;\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir 'gcmfaces_smooth/;\n']);  
 %fprintf(fid,['addpath ' gcmfaces_dir 'gcmfaces_specs/;\n']);  
 %fprintf(fid,['addpath ' gcmfaces_dir 'gcmfaces_legacy/;\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir 'gcmfaces_devel/;\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir 'sample_analysis/;\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir 'sample_processing/;\n']);  
 fprintf(fid,['addpath ' gcmfaces_dir 'ecco_v4/;\n']);  
 fclose(fid);  
   
 if gcmfaces_verbose;  
 fprintf('\n\n\n***********message from gcmfaces_init.m************ \n');  
 fprintf(' gcmfaces_path.m was created that, when executed, \n');  
 fprintf(' adds the gcmfaces directories to your path  \n\n\n');  
 fprintf(' ultimately you may want to copy it in your startup.m \n');  
 end;  
   
 gcmfaces_path;  
3    
4  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;
5    
6  fprintf('\n\n basic gcmfaces test: started... \n');  warning('off','MATLAB:HandleGraphics:noJVM');
   gcmfaces_path;  
   global mygrid; mygrid=[]; grid_load([gcmfaces_dir '/sample_input/GRIDv4/'],5,'compact');  
   nameFld='DDetan'; tt=[53:78]*336; cc=[0 0.10];  
   fld=rdmds2gcmfaces([gcmfaces_dir '/sample_input/SAMPLEv4/' nameFld],tt);  
   fld=std(fld,[],3); msk=mygrid.hFacC(:,:,1); fld(find(msk==0))=NaN;  
 fprintf(' basic gcmfaces test: completed. \n\n');  
   
 if ~gcmfaces_skipplottest;  
   
 if gcmfaces_verbose;  
 fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');  
 fprintf(' starting 1st example routine: plot_one_field ... \n');  
 end;  
   
 plot_one_field('v4',0);  
7    
8  if gcmfaces_verbose;  if myenv.verbose;
9  fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');    fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');
10  fprintf(' starting 2nd example routine: plot_std_field ... \n');    fprintf(' starting basic test : plot_std_field ... \n');
11  end;  end;
   
12  plot_std_field('v4');  plot_std_field('v4');
13    
14    if ~myenv.lessplot;
15      if myenv.verbose;
16        fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');
17        fprintf(' starting plot test: plot_one_field ... \n');
18      end;
19      plot_one_field('v4',0);
20    end;
21    
22    if ~myenv.lesstest;
23      if myenv.verbose;
24        fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');
25        fprintf(' starting computations test: basic_diags_compute_v3_or_v4 ... \n');
26      end;
27      basic_diags_compute_v3_or_v4('v4');
28      if ~myenv.lessplot; basic_diags_display_v3_or_v4('v4'); end;
29  end;  end;
30    
31  if gcmfaces_verbose;  if myenv.verbose;
32  fprintf('\n\n\n***********message from gcmfaces_init.m************\n ');    fprintf('\n\n\n***********message from gcmfaces_init.m************\n');
33  fprintf(' --- initialization of gcmfaces completed correctly \n');    fprintf(' --- initialization of gcmfaces completed correctly \n');
34  fprintf(' --- you are all set and may now use the gcmfaces package \n');    fprintf(' --- you are all set and may now use the gcmfaces package \n');
35  fprintf(' --- eventually, to avoid running gcmfaces_init over again \n');    fprintf(' --- eventually, to avoid running gcmfaces_init over again \n');
36  fprintf(' --- you may want to copy the gcmfaces_path.m code to your startup.m \n\n\n');    fprintf(' --- you may want to copy the gcmfaces_path.m code to your startup.m \n\n\n');
37  end;  end;
38    

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.22