clear

load('Figure1_data.mat')
fs=10;

close all
figure
set(gcf,'unit','centimeters','position',[15,5,20,9])

% (a) OISST Global MHW Mean intensity
ha1=axes('position',[0.045,0.64,0.29,0.325],'fontname','Times New Roman');
set(gcf,'currentaxes',ha1);
m_proj('Equidistant Cylindrical','lon',[0 360],'lat',[-80 90]);
m_contourf(Xa,Ya,MMMa,[0:0.2:6],'linestyle','none')
m_grid('linest','none','xticklabels',[],'yticklabels',[-60 -30 0 30 60 90],'fontsize',fs,'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
colormap(sunshine_9lev_2/255)
caxis([0 5]);
hc=colorbar('horizontal');
set(hc,'position',[0.045,.61,0.442,0.015],'Ticks',[0 1 2 3 4 5],'fontname','Times New Roman','fontsize',fs)
cbarrow('right') 
title('(a) OISST MHW','fontsize',fs,'fontname','Times New Roman')

% (b) OISST Arctic MHW Mean intensity
ha2=axes('position',[0.33,0.64,0.17,0.334],'fontname','Times New Roman');
set(gcf,'currentaxes',ha2);
m_proj('stereographic','lat',90,'long',0,'radius',35,'rectbox','on');       
m_contourf(Xa,Ya,MMMa,[0:0.2:6],'linestyle','none')
m_grid('linest',':','xticklabels',[],'ytick',[70 80],'yticklabels',[]);
m_coast('patch',[.8 .8 .8]);
colormap(sunshine_9lev_2/255)
caxis([0 5]); 
hc=colorbar('horizontal');
set(hc,'position',[0.045,.61,0.442,0.015],'Ticks',[0 1 2 3 4 5],'fontname','Times New Roman','fontsize',fs)
cbarrow('right') 
title('(b) OISST MHW','fontsize',fs,'fontname','Times New Roman')
text(-1.5,-0.76,'Mean intensity (\circC)','fontsize',fs,'fontname','Times New Roman')

% (c) OISST Global MHW Annual total days
ha3=axes('position',[0.545,0.64,0.29,0.325],'fontname','Times New Roman');
set(gcf,'currentaxes',ha3);
m_proj('Equidistant Cylindrical','lon',[0 360],'lat',[-80 90]);
m_contourf(Xa,Ya,MMMc,[0:40],'linestyle','none')
m_grid('linest','none','xticklabels',[],'yticklabels',[-60 -30 0 30 60 90],'fontsize',fs,'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
colormap(ha3,sunshine_9lev_2/255)
caxis([0 40]);
hc=colorbar('horizontal');
set(hc,'position',[0.545,.61,0.442,0.015],'Ticks',[0 10 20 30 40],'fontname','Times New Roman','fontsize',fs)
cbarrow('right')
title('(c) OISST MHW','fontsize',fs,'fontname','Times New Roman')

% (d) OISST Arctic MHW Annual total days
ha4=axes('position',[0.83,0.64,0.17,0.334],'fontname','Times New Roman');
set(gcf,'currentaxes',ha4);
m_proj('stereographic','lat',90,'long',0,'radius',35,'rectbox','on');       
m_contourf(Xa,Ya,MMMc,[0:40],'linestyle','none')
m_grid('linest',':','xticklabels',[],'ytick',[70 80],'yticklabels',[],'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
colormap(sunshine_9lev_2/255)
caxis([0 40]); 
hc=colorbar('horizontal');
set(hc,'position',[0.545,.61,0.442,0.015],'Ticks',[0 10 20 30 40],'fontname','Times New Roman','fontsize',fs)
cbarrow('right')
title('(d) OISST MHW','fontsize',fs,'fontname','Times New Roman')
text(-1.55,-0.76,'Annual total days (days)','fontsize',fs,'fontname','Times New Roman')

% (e) CMIP6 Global MHW Mean intensity
ha5=axes('position',[0.045,0.14,0.29,0.325],'fontname','Times New Roman');
set(gcf,'currentaxes',ha5);
m_proj('Equidistant Cylindrical','lon',[0 360],'lat',[-80 90]);
m_contourf(Xe,Ye,MMMe,[0:0.2:6],'linestyle','none')
m_grid('linest','none','xticklabels',[],'yticklabels',[-60 -30 0 30 60 90],'fontsize',fs,'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
colormap(ha5,sunshine_9lev_2/255)
caxis([0 5]); 
hc=colorbar('horizontal');
set(hc,'position',[0.045,.11,0.442,0.015],'Ticks',[0 1 2 3 4 5],'fontname','Times New Roman','fontsize',fs)
cbarrow('right') 
title('(e) CMIP6 MHW','fontsize',fs,'fontname','Times New Roman')

% (f) CMIP6 Arctic MHW Mean intensity
ha6=axes('position',[0.33,0.14,0.17,0.334],'fontname','Times New Roman');
set(gcf,'currentaxes',ha6);
m_proj('stereographic','lat',90,'long',0,'radius',35,'rectbox','on');       
m_contourf(lon,lat,MMMe1,[0:0.2:4],'linestyle','none')
m_grid('linest',':','xticklabels',[],'ytick',[70 80],'yticklabels',[],'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
colormap(sunshine_9lev_2/255)
caxis([0 5]); 
hc=colorbar('horizontal');
set(hc,'position',[0.045,.11,0.442,0.015],'Ticks',[0 1 2 3 4 5],'fontname','Times New Roman','fontsize',fs)
cbarrow('right') 
title('(f) CMIP6 MHW','fontsize',fs,'fontname','Times New Roman')
text(-1.5,-0.76,'Mean intensity (\circC)','fontsize',fs,'fontname','Times New Roman')

% (g) CMIP6 Global MHW Annual total days
ha7=axes('position',[0.545,0.14,0.29,0.325],'fontname','Times New Roman');
set(gcf,'currentaxes',ha7);
m_proj('Equidistant Cylindrical','lon',[0 360],'lat',[-80 90]);
m_contourf(Xe,Ye,MMMg,[0:40],'linestyle','none')
m_grid('linest','none','xticklabels',[],'yticklabels',[-60 -30 0 30 60 90],'fontsize',fs,'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
colormap(sunshine_9lev_2/255)
caxis([0 40]); 
hc=colorbar('horizontal');
set(hc,'position',[0.545,.11,0.442,0.015],'Ticks',[0 10 20 30 40],'fontname','Times New Roman','fontsize',fs)
cbarrow('right')  
title('(g) CMIP6 MHW','fontsize',fs,'fontname','Times New Roman')

% (h) CMIP6 Arctic MHW Annual total days
ha8=axes('position',[0.83,0.14,0.17,0.334],'fontname','Times New Roman');
set(gcf,'currentaxes',ha8);
m_proj('stereographic','lat',90,'long',0,'radius',35,'rectbox','on');       
m_contourf(lon,lat,MMMg1,[0:40],'linestyle','none')
m_grid('linest',':','xticklabels',[],'ytick',[70 80],'yticklabels',[],'fontname','Times New Roman');
m_coast('patch',[.8 .8 .8]);
colormap(sunshine_9lev_2/255)
caxis([0 40]); 
hc=colorbar('horizontal');
set(hc,'position',[0.545,.11,0.442,0.015],'Ticks',[0 10 20 30 40],'fontname','Times New Roman','fontsize',fs)
cbarrow('right')
title('(h) CMIP6 MHW','fontsize',fs,'fontname','Times New Roman')
text(-1.55,-0.76,'Annual total days (days)','fontsize',fs,'fontname','Times New Roman')

print(gcf,'-dpdf','-r600','D:\data_code_figures\figures\Figure1.pdf')