%to load the ECCO v4 / LLC90 grid: % %nF=5; %fileFormat='compact'; %dirGrid=fullfile([myenv.gcmfaces_dir '../']); %dirGrid=fullfile(dirGrid,'GRID/'); % %to instead load e.g. your MITgcm lat-lon grid, %you would edit the example routines to look like: % % nF=1; % fileFormat='straight'; % dirGrid='./'; % %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 %mv mit.ecco-group.org/gforget/nctiles_budget gcmfaces/sample_input/. %rm -rf mit.ecco-group.org % %to activate example_remap: % %wget ftp://mit.ecco-group.org/gforget/testcase_remap.mat %mv testcase_remap.mat gcmfaces/sample_input/. %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; plot_one_field; fprintf('\n\n'); gcmfaces_msg('///////////////////////////////////////////'); gcmfaces_msg('demo of remapping and smoothing','// PART 2 :'); gcmfaces_msg('please hit return','// >> '); gcmfaces_msg('///////////////////////////////////////////'); fprintf('\n\n'); pause; if 1;%one method to map lon-lat fields to gcmfaces example_remap(1); else;%alternatives example_griddata; example_interp; example_faces2latlon2faces; end; example_bin_average(1);%incl. call to example_smooth.m; 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); 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;