function []=demo_grids(gridDir);
% DEMO_GRIDS llustrates grids using gcmfaces_sphere.m
%

if nargin==0;
  gridDir='cs_nostretch/cube_540/';
  demo_grids(gridDir);
  gridDir='llc_nostretch/llc_540/';
  demo_grids(gridDir);
  gridDir='llpc_nostretch/llpc_540/';
  demo_grids(gridDir);
  return;
end;

gcmfaces_global; mygrid=[]; 

tmp1=dir([gridDir '*.bin']); 
nFaces=length(tmp1);
grid_load_native(gridDir,nFaces,0);

%load([gridDir 'bathy.mat']); fld=gcmfaces;
%for ff=1:fld.nFaces; fld{ff}=bathy{ff}.vals; end;
%figure; gcmfaces_sphere(fld,[-9e3 6e3],10,'S',1);

fld=log10(mygrid.RAC); cc=max(fld)+[-2 0];
figure; gcmfaces_sphere(fld,cc,20,'N',1); colormap('hot');
gcmfaces_caption(['log10 of grid cell area for: ' gridDir]);


