%%  the hope that  it  will  be  useful,  but  without  any  %
%%  warranty.  You  can  redistribute  it and/or modify  it  %
%%  under  the  terms  of  the  GNU  General Public License  %
%%  as  published  by  the   Free  Software  Foundation  at  %
%%       http://www.gnu.org/copyleft/gpl.html                %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Octave script plot CHL
%
% 24/10/2015: andrea.doglioli@univ-amu.fr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function plot_CHL(fname,data_interval)

load(fname);


chl_min=data_interval(1);
chl_max=data_interval(2);

%chl(chl<0.02)=NaN;
%chl(chl<chl_min)=chl_min;
%chl(chl>0.4)=NaN;
%chl(chl>chl_max)=chl_max;
chl(chl==-999)=NaN;

%[C,hc]=m_contourf(lon,lat,chl);
%set(hc,'EdgeColor','none') 

%m_pcolor(lon,lat,chl)
m_pcolor(lon,lat,log(chl))

shading flat

caxis([chl_min chl_max])

%cMap = jet; cMap = [1 1 1; cMap; 1 1 1] ; colormap(cMap); 
colormap(jet);
colorbar

title(fname,'interpreter','none')

return
