% octasample2.m
% b klinger, 5/17/16
% Illustrate mscripts to create OctaGlobe.
% Uses bathdeg.mat, projocta.m, conocta.m, octacircles.m, octapage.m
% Graphics option 2 also calls contourfP.m, colorpal.m, maptoint.m

%---------------------------------------------------------------------
% Choose contour routine & get sample data (1-degree topography).
%---------------------------------------------------------------------

iwhich=input('1 for standard contours, 2 for contourfP contours: ');
load bathdeg.mat       % 1 deg resolution topography (m)
D=D/1000;              % convert to km

%---------------------------------------------------------------------
% Project on to flattened OctaGlobe.
%---------------------------------------------------------------------

if ~exist('iland')
   hLS=figure('PaperOrientation','landscape');
   set(hLS,'PaperPosition',[-1 -1 13 10.5]);
   set(hLS,'Name','Landscape');
   iland=1;
end
clf; hold off; figure(gcf)
ci=[-10 -6:1:6];          % contour values for plot

if iwhich==1
   hand=conocta('f',lon1,lat1,D,ci,{'k'});
elseif iwhich==2
   xlohi=[.1 .9; .3 1];   % selects subsets of colormap libraries
   hand=conocta('fP',lon1,lat1,D,ci,{'bG',0,'none',.5,xlohi});
end
octacircles(0,'r','k')    % plot selected latitude circles
octapage(1);              % set axis for one-page printout of plot

