%call sequence: % % addpath gcmfaces; gcmfaces_demo; % %expected directory structure: % % gcmfaces (codes) % MITprof (codes) % nctiles_grid (ECCO v4 grid) % release1 (ECCO v4 output) % sample_input (test material) % %to activate example_remap: % % mkdir sample_input % wget ftp://mit.ecco-group.org/gforget/testcase_remap.mat % mv testcase_remap.mat sample_input/. % %to activate example_transports: % % mkdir release1 % wget --recursive ftp://mit.ecco-group.org/ecco_for_las/version_4/release1/nctiles_climatology % mv mit.ecco-group.org/gforget/nctiles_climatology release1/. % rm -rf mit.ecco-group.org % %to activate example_budget: % % wget --recursive ftp://mit.ecco-group.org/gforget/nctiles_budget_2d % mv mit.ecco-group.org/gforget/nctiles_budget_2d sample_input/. % rm -rf mit.ecco-group.org % %choose verbose level fprintf('\n Please set the amount of explanatory text display :\n'); fprintf(' 0: none.\n'); fprintf(' 1: comments.\n'); fprintf(' 2: comments preceeded with calling sequence.\n'); fprintf(' 3: same as 2, but preceeded with pause.\n'); verbose=input(' and/or type return. 0 is the default. \n'); if isempty(verbose); verbose=0; end; %initialize environment variables and mygrid addpath gcmfaces; gcmfaces_global; myenv.issueWarnings=0; myenv.verbose=verbose; if myenv.verbose>0; gcmfaces_msg('* set path and environment variables (myenv) by calling gcmfaces_global'); end; addpath MITprof; if ~isempty(which('MITprof_global')); MITprof_global; if myenv.verbose>0; gcmfaces_msg('* set MITprof path by calling MITprof_global'); end; end; fprintf('\n\n'); gcmfaces_msg('/////////////////////////////////////'); gcmfaces_msg('demo of plotting routines','// PART 1 :'); gcmfaces_msg('please hit return','// >> '); gcmfaces_msg('/////////////////////////////////////'); fprintf('\n\n'); pause; example_display; fprintf('\n\n'); gcmfaces_msg('///////////////////////////////////////////'); gcmfaces_msg('demo of remapping ','// PART 2 :'); gcmfaces_msg('please hit return','// >> '); gcmfaces_msg('///////////////////////////////////////////'); fprintf('\n\n'); pause; example_remap(0); fprintf('\n\n'); gcmfaces_msg('///////////////////////////////////////////'); gcmfaces_msg('demo of bin averaging (gridding)','// PART 2 :'); gcmfaces_msg('please hit return','// >> '); gcmfaces_msg('///////////////////////////////////////////'); fprintf('\n\n'); pause; %alternatives %example_griddata; %example_interp; %example_faces2latlon2faces; fld=example_bin_average; fprintf('\n\n'); gcmfaces_msg('///////////////////////////////////////////'); gcmfaces_msg('demo of smoothing ','// PART 2 :'); gcmfaces_msg('please hit return','// >> '); gcmfaces_msg('///////////////////////////////////////////'); fprintf('\n\n'); pause; example_smooth(fld); fprintf('\n\n'); gcmfaces_msg('/////////////////////////////////////////'); gcmfaces_msg('demo of transport computations','// PART 3 :'); gcmfaces_msg('please hit return','// >> '); gcmfaces_msg('/////////////////////////////////////////'); fprintf('\n\n'); pause; diags=example_transports; if ~isempty(diags); fprintf('\n\n'); gcmfaces_msg('/////////////////////////////////////////'); gcmfaces_msg('demo of transport display','// PART 3 :'); gcmfaces_msg('please hit return','// >> '); gcmfaces_msg('/////////////////////////////////////////'); fprintf('\n\n'); example_transports_disp(diags); end; fprintf('\n\n'); gcmfaces_msg('/////////////////////////////////////////'); gcmfaces_msg('demo of budget computations','// PART 4 :'); gcmfaces_msg('please hit return','// >> '); gcmfaces_msg('/////////////////////////////////////////'); fprintf('\n\n'); pause; example_budget;