%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%                    lat_tsgEXtools                         %%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%  This  file  is  free software ;  it  is distributed  in  %
%%  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                %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% function load_TSG
%%
%% load TSG data from an .ASC file
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% 25/11/2015 AD: creation 
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function plot_CYTO(fname,myvar,interval,mycolor)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if isempty(mycolor)
mycolor='k-';
end
%%%

[numdate,DAY,lon,lat,TRANSECT,...
Prochlo_ABD,Prochlo_Fper,Prochlo_Cper,...
Synecho_ABD,Synecho_Fper,Synecho_Cper,...
Pico_ABD,Pico_Fper,Pico_Cper,...
Crypto_ABD,Crypto_Fper,...;
Nano_ABD,Nano_Fper,Nano_Cper,...
Micro_ABD,Micro_Fper,...
shannon]=load_CYTO(fname);

ii=find(numdate>interval(1) & numdate<interval(2));

if isempty(ii)
 disp('no data in the requested time interval')
 return
end

if strcmp(myvar,'Prochlo_ABD')
var=Prochlo_ABD;
m_scatter(lon(ii),lat(ii),50,var(ii),'filled','MarkerEdgeColor',mycolor);
caxis([10000 50000])

elseif strcmp(myvar,'Synecho_ABD')
var=Synecho_ABD;
m_scatter(lon(ii),lat(ii),50,var(ii),'filled','MarkerEdgeColor',mycolor);
caxis([15000 25000])

elseif strcmp(myvar,'Pico_ABD')
var=Pico_ABD;
m_scatter(lon(ii),lat(ii),50,var(ii),'filled','MarkerEdgeColor',mycolor);
caxis([600 1800])

elseif strcmp(myvar,'Nano_ABD')
var=Nano_ABD;
m_scatter(lon(ii),lat(ii),50,var(ii),'filled','MarkerEdgeColor',mycolor);
caxis([600 1200])

elseif strcmp(myvar,'Crypto_ABD')
var=Crypto_ABD;%Cryptophytes_likeAbd;
m_scatter(lon(ii),lat(ii),50,var(ii),'filled','MarkerEdgeColor',mycolor);
caxis([20 120])

elseif strcmp(myvar,'Micro_ABD')
var=Micro_ABD;
m_scatter(lon(ii),lat(ii),50,var(ii),'filled','MarkerEdgeColor',mycolor);
caxis([10 50])

else
disp('data not available')
return

end%if strcmp
h=colorbar;
ylabel(h,myvar,'FontSize',15)
return

