function mapMB(X,Y,Z,f)
addpath(genpath('/Users/Mau/Documents/MATLABhelp_new'));

% X=X(:,1:2:end);
% Y=Y(:,1:2:end);
% Z=S;

%[X,Y]=meshgrid(-180:180,-90:-30);
% Y=flipud(Y);
% Z=nan(size(Y));

% Load Colormaps
%addpath(genpath('/Volumes/palisade/scripts/MATLABfunctions/functions'));
% load('MyColormapCorr.mat');
% barracolor=corrbluelightwred;
load('MyColormapCorr_new.mat');
barracolor=bluelightwred;
mini=nanmin(nanmin(Z));
maxi=nanmax(nanmax(Z));

% m_quiver(X(1:10:end,1:20:end),Y(1:10:end,1:20:end),U(1:10:end,1:20:end),V(1:10:end,1:20:end),'k');
%% Colors Frentes Orsi

% Dark grey line:
   colPF  = [0.2 0.2 0.2];
   colSAF = [0.2 0.2 0.2];
   colSTF = [0.2 0.2 0.2];%[0.99 1 1];
   colSACCF = [0.2 0.2 0.2];%[0.99 1 1];
   colSB = [0.2 0.2 0.2];%[0.99 1 1];
   coldots= [0 0 0];%[0 0 0];%[0.6 0.6 0.6];
   
% % white lines:   
%    colPF  = [0.99 1 1];% [0.2 0.2 0.2];%
%    colSAF = [0.99 1 1];
%    colSTF = [0.99 1 1];
%    colSACCF = [0.99 1 1];
%    colSB = [0.99 1 1];
%    coldots= [0 0 0];

lonmin=-123;
lonmax=-121.6;
latmin=36;
latmax=37;

m_proj('lambert','lons',[lonmin lonmax],'lat',[latmin latmax],'rectbox','on');

% m_proj('Azimuthal Equal-area','lat',-90,'long',-60,'radius',60);%'alt',2); 
% m_proj('Azimuthal Equal-area','lat',-90,'long',0,'radius',60);%'long',-60,'alt',2);

hold on
%h=m_pcolor([X(:,end) X X(:,1)],[Y(:,end) Y Y(:,1)],[Z(:,end) Z Z(:,1)]);

[LON,indx]= sort(X,1);
LAT=Y;
VAR=Z(indx(:,1),:);

LON=padarray(LON,[2 2],'circular');
LAT=padarray(LAT,[2 2],'circular');
VAR=padarray(VAR,[2 2],'circular');

h=m_pcolor(LON,LAT,VAR);

hold on
set(h,'linestyle','none');
% m_plot(x3,y3,'.','color',coldots,'markersize',0.5,'linestyle','none');

if f==1;
% Plot Mooring locations
C1=[36.75, -122.03];
M1=[36.75, -122.03];
M2=[36.75, -122.03];

m_plot(M1(:,1),M2(:,2),'color','k','MarkerFaceColor','w',...
     'linestyle','o','linewidth',2)%3) %'-.','color','w','markersize',4);
m_plot(M2(:,1),M2(:,2),'color','MarkerFaceColor','w',...
     'linestyle','o','linewidth',2)%3) %'-.','color','w','markersize',4);
m_plot(C1(:,1),C1(:,2),'color','MarkerFaceColor','w',...
     'linestyle','o','linewidth',2)%3)% '-.','color','w','markersize',4);
hold on

%[C,h] = m_contour(X,Y,rho3,[-0.6:0.2:0.6],'k');
%if cl == 1    %clabel(C,h,'manual')
end

colormap(barracolor);%bluegred);%bluegyellow)
% caxis([mini maxi])
h=colorbar('vert','fontsize',16);%40); 
% set(get(h,'Title'),'String','Chl-a vs WSPD','fontsize',20);

% m_coast('patch',[0.5 0.5 .5]);
% m_elev('contourf',[0:100:6000]);
m_grid('tickdir','in','xaxislocation','top','yaxislocation','left','linestyle','none',...
    'xtick',[lonmin:0.1:lonmax],...
    'ytick',[latmin:0.1:latmax],'fontsize',16); % 40); %'box','fancy'
% m_grid('tickdir','in','xaxislocation','top','yaxislocation','right','linestyle','--',...
%     'xtick',[-180:90:180],...
%     'ytick',[-60:20:-40],'fontsize',22);%40); %'box','fancy'


% m_grid('tickdir','in','xaxislocation','top','yaxislocation','right','linestyle','--',...
%     'xtick',[-180+45:90:180-45],...
%     'ytick',[-70:10:-30],'fontsize',22);%22); %'box','fancy'

% m_grid('tickdir','in','xaxislocation','top','yaxislocation','right','linestyle','none',...
%     'xtick',[],...
%     'ytick',[],'fontsize',22);%22); %'box','fancy'

m_tbase('contour',[-1000:100:0],'edgecolor','k'); %5' resolution, still too coarse
m_etopo2('contourf',[-5000:100:0]);
cmocean('topo','pivot',0)

m_gshhs_l('patch',[0.5 0.5 .5]);
% m_coast('patch',[0.5 0.5 .5]);

% maximize;
set(gcf,'PaperPositionMode','auto')
