clear all;
close all;
mxld6=nc_varget('H04S5_2d_2006.06.nc','mxld');
mxld7=nc_varget('H04S5_2d_2006.07.nc','mxld');
mxld8=nc_varget('H04S5_2d_2006.08.nc','mxld');
mxld9=nc_varget('H04S5_2d_2006.09.nc','mxld');
mxld10=nc_varget('H04S5_2d_2006.10.nc','mxld');
mxld11=nc_varget('H04S5_2d_2006.11.nc','mxld');
pcolor(mxld6);load Odv;colormap(cmap);colorbar;caxis([0 300]);shading flat;
saveas(gca,'mxld_6.png');
pcolor(mxld7);load Odv;colormap(cmap);colorbar;caxis([0 300]);shading flat;
saveas(gca,'mxld_7.png');
pcolor(mxld8);load Odv;colormap(cmap);colorbar;caxis([0 300]);shading flat;
saveas(gca,'mxld_8.png');
pcolor(mxld9);load Odv;colormap(cmap);colorbar;caxis([0 300]);shading flat;
saveas(gca,'mxld_9.png');
pcolor(mxld10);load Odv;colormap(cmap);colorbar;caxis([0 300]);shading flat;
saveas(gca,'mxld_10.png');
pcolor(mxld11);load Odv;colormap(cmap);colorbar;caxis([0 300]);shading flat;
saveas(gca,'mxld_11.png');
%%
clear all;
close all;
load grid.mat;
load coast;
mxld6=nc_varget('H04S5_mxld_ave_06.nc','mxld');
mxld7=nc_varget('H04S5_mxld_ave_07.nc','mxld');
mxld8=nc_varget('H04S5_mxld_ave_08.nc','mxld');
mxld9=nc_varget('H04S5_mxld_ave_09.nc','mxld');
mxld10=nc_varget('H04S5_mxld_ave_10.nc','mxld');

plat(end+1,:)=plat(1,:);
plon(end+1,:)=plon(1,:);
mxld6(end+1,:)=mxld6(1,:);
mxld7(end+1,:)=mxld7(1,:);
mxld8(end+1,:)=mxld8(1,:);
mxld9(end+1,:)=mxld9(1,:);
mxld10(end+1,:)=mxld10(1,:);

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
pcolorm(plat,plon,mxld6);load Odv;colormap(cmap);colorbar;caxis([0 400]);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
saveas(gca,'H04S5_mxld_ave_06.png');
close;

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
pcolorm(plat,plon,mxld7);load Odv;colormap(cmap);colorbar;caxis([0 400]);
saveas(gca,'H04S5_mxld_ave_07.png');
close;

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
pcolorm(plat,plon,mxld8);load Odv;colormap(cmap);colorbar;caxis([0 400]);
saveas(gca,'H04S5_mxld_ave_08.png');
close;

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
pcolorm(plat,plon,mxld9);load Odv;colormap(cmap);colorbar;caxis([0 400]);
saveas(gca,'H04S5_mxld_ave_09.png');
close;

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
pcolorm(plat,plon,mxld10);load Odv;colormap(cmap);colorbar;caxis([0 400]);
saveas(gca,'H04S5_mxld_ave_10.png');

%% subplot
% figure('color','w');
subplot(2,2,1);
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
pcolorm(plat,plon,mxld6);load Odv;colormap(cmap);colorbar;caxis([0 400]);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);

subplot(2,2,2);
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
pcolorm(plat,plon,mxld7);load Odv;colormap(cmap);colorbar;caxis([0 400]);

subplot(2,2,3);
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
pcolorm(plat,plon,mxld8);load Odv;colormap(cmap);colorbar;caxis([0 400]);

subplot(2,2,4);
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
pcolorm(plat,plon,mxld9);load Odv;colormap(cmap);colorbar;caxis([0 400]);

saveas(gcf,'H04S5_mxld_ave.png');


%%
clear all;
close all;
load coast
plat=nc_varget('mld_DR003.nc','lat');
plon=nc_varget('mld_DR003.nc','lon');
mxld=nc_varget('mld_DR003.nc','mld');
[plon plat]=meshgrid(plon,plat);
mxld6=squeeze(mxld(6,:,:));
mxld7=squeeze(mxld(7,:,:));
mxld8=squeeze(mxld(8,:,:));
mxld9=squeeze(mxld(9,:,:));
mxld10=squeeze(mxld(10,:,:));
plat(:,end+1)=plat(:,1);
plon(:,end+1)=plon(:,1);
mxld6(:,end+1)=mxld6(:,1);
mxld7(:,end+1)=mxld7(:,1);
mxld8(:,end+1)=mxld8(:,1);
mxld9(:,end+1)=mxld9(:,1);
mxld10(:,end+1)=mxld10(:,1);

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
pcolorm(plat,plon,mxld6);load Odv;colormap(cmap);colorbar;caxis([0 400]);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
saveas(gca,'mdl_DR003_06.png');
close;

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
pcolorm(plat,plon,mxld7);load Odv;colormap(cmap);colorbar;caxis([0 400]);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
saveas(gca,'mdl_DR003_07.png');
close;

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
pcolorm(plat,plon,mxld8);load Odv;colormap(cmap);colorbar;caxis([0 400]);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
saveas(gca,'mdl_DR003_08.png');
close;

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
pcolorm(plat,plon,mxld9);load Odv;colormap(cmap);colorbar;caxis([0 400]);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
saveas(gca,'mdl_DR003_09.png');
close;

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
pcolorm(plat,plon,mxld10);load Odv;colormap(cmap);colorbar;caxis([0 400]);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
saveas(gca,'mdl_DR003_10.png');

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
pcolorm(plat,plon,mxld8-mxld9);load BlueRed_Odv;colormap(cmap);colorbar;caxis([-50 50]);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
title('mld\_DR003\_Aug-Sept');
saveas(gca,'mdl_DR003_8-9.png');
close;

figure('color','w');
axesm('stereo','origin',[-90 -20],'maplatlimit',[-90 -20]);
axis off;framem on;gridm on;mlabel on;plabel on;
setm(gca,'mlabelparallel',-20);
pcolorm(plat,plon,mxld9-mxld10);load BlueRed_Odv;colormap(cmap);colorbar;caxis([-50 50]);
patchm(lat,long,'facecolor',[0.6 0.6 0.6]);
title('mld\_DR003\_Sept.-Oct.');
saveas(gca,'mdl_DR003_9-10.png');
