function [h]=thelonious_sphere_map(field,lon,lat,clon,clat,varargin);
% []=thelonius_sphere_map(field,lon,lat,clon,clat,nc);
%
%    Mapping 2D flieds onto a sphere using Orthographic Projection
%                 overlays positive and minus contours as white (solid/dashed)  
%
%    Imputs :
%                -  field ( nx by ny ) 
%                -  lon   (nx)
%                -  lat   (ny)
%                -  clon, clat : coordinates of view point
%                - nc : number of countours (13 or 17 recommended)
%  
%   Hepta Technologies , Sept 2006   
%   
%    Reference :   http://en.wikipedia.org/wiki/Thelonious_Monk
%    
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
if (nargin<6)
   nc=13;
else nc=varargin{1};
end
%
S.U=field;
S.X=lon;
S.Y=lat;
make_periodic('S','X');
[M,m]=maxmin(S.U);
L=max([-m,M]);
ci=linspace(-L,L,nc);
m_proj('ortho','lat',clat,'long',clon);
%
[cs,h]=m_contourf(S.X,S.Y,S.U,ci); colormap(cejulien2(nc));  hold on
caxis([-L,L]);
m_coast('line', 'color',[0 0 0],'LineWidth', [2], 'LineStyle', '-'); hold on
m_grid('xtick',6,'ytick',6,'linest','-','YaxisLocation','right', 'FontSize', 9);
colorbar3('vert'); hold on; caxis([-L,L]);
[cspm,hpm]=m_contourpm_white(S.X,S.Y,S.U,ci); hold off

