%% load dataload dataPaper.mat%% make plots% heat flux componentsfigureclfsubplot(121)  plot(water.ws_ms,water.Q_Latent,'ko','markersi',10,'markerfacecolor','w')  hold on  plot(water.ws_ms,(water.Q_OUT-water.Q_IN),'k+','markersi',10)  plot(water.ws_ms,water.Q_radNet,'k.')  axis([.5 2.75 -50 900]); ax = axis;  grid on  axis square  ylabel('heat flux [W m^{-2}]')  xlabel('U, wind speed [m s^{-1}]')  title('foam-free')  legend('Q_L','Q_S','Q_R')  set(gca,'fontsi',16)subplot(122)  plot(foam.ws_ms,foam.Q_Latent,'ko','markersi',10,'markerfacecolor','w')  hold on  plot(foam.ws_ms,(foam.Q_OUT-foam.Q_IN),'k+','markersi',10)  plot(foam.ws_ms,foam.Q_radNet,'k.')  axis(ax)  grid on  axis square  xlabel('U, wind speed [m s^{-1}]')  title('foam')  set(gca,'fontsi',16)% fraction of heat fluxfigureclfsubplot(121)  plot(foam.RH,foam.Q_Latent./(foam.Q_net_CC),'ks','linew',1.5,'markerfacecolor','w')  hold on  plot(water.RH,water.Q_Latent./(water.Q_net_CC),'k.','markersi',16)  grid on  %axis([35 80 .735 .755])  axis square  ylabel('Q_L/Q_E')  xlabel('RH [%]')  legend('foam','foam-free','location','southwest')  set(gca,'fontsi',16)subplot(122)  plot(foam.RH,(foam.Q_OUT-foam.Q_IN)./(foam.Q_net_CC),'ks','linew',1.5,'markerfacecolor','w')  hold on  plot(water.RH,(water.Q_OUT-water.Q_IN)./(water.Q_net_CC),'k.','markersi',16)  grid on  axis square  %axis([35 80 0.246 0.264])  ylabel('Q_S/Q_E')  xlabel('RH [%]')  %legend('foam','foam-free','location','southwest')  set(gca,'fontsi',16)%Q_E versus Uwind, Ta-Tw and RHfigureclfscatter(foam.ws_ms,foam.Q_net_CC,150,foam.RH,'filled','s','linew',2,'MarkerEdgeColor','k')hold onscatter(water.ws_ms,water.Q_net_CC,50,water.RH,'filled','MarkerEdgeColor','k')axis([.5 2.75 0 1200]);colormap(flipud(parula(32)))caxis([35 80])xlabel('wind speed, U [m s^{-1}]')ylabel('Q_E [W m^{-2}]')grid onhc = colorbar;hc.YLabel.String = 'relative humidity [%]';set(gca,'fontsi',16)lgd = legend('foam','foam-free','location','best'); set(lgd,'fontsi',22)figureclfscatter(foam.ws_ms,foam.Q_net_CC,150,(foam.Tair_in-273.15 - foam.temp7) ,'s','filled','MarkerEdgeColor','k','linew',2)hold onscatter(water.ws_ms,water.Q_net_CC,50,water.Tair_in-273.15 - water.temp7,'filled','MarkerEdgeColor','k')axis([.5 2.75 0 1200]);colormap inferno(32)caxis([-10 0])xlabel('wind speed, U [m s^{-1}]')ylabel('Q_E [W m^{-2}]')grid onhc = colorbar;hc.YLabel.String = '\DeltaT_{a-w} [C]';set(gca,'fontsi',16)lgd = legend('foam','foam-free','location','best'); set(lgd,'fontsi',22)% transfer coefficient from Jeong et alfigureclf%h3 = plot([0.5:.1:2.7]',Ck_ji,'--k','linew',2);h3 = plot(unique(U_j),Ck_ji,'--k','linew',2,'markerfacecolor','w');hold onh2 = scatter(water.ws_ms,water.Ck,50,water.RH,'filled','MarkerEdgeColor','k');h1 = scatter(foam.ws_ms,foam.Ck_cor,150,foam.RH,'filled','s','linew',2,'MarkerEdgeColor','k');grid onxlim([.5 2.8])colormap(flipud(parula(32)))hc = colorbar;caxis([35 80])hc.YLabel.String = 'relative humidity [%]';xlabel('U, wind speed [m s^{-1}]')ylabel('C_k, exchange coefficient')set(gca,'fontsi',16)lgd = legend([h1 h2 h3],{'foam','foam-free','Jeong et al., 2012'},'location','best');set(lgd,'fontsi',22)figureclf%h3 = plot([0.5:.1:2.7]',Ck_ji,'--k','linew',2);h3 = plot(unique(U_j),Ck_ji,'--k','linew',2,'markerfacecolor','w');hold onh2 = scatter(water.ws_ms,water.Ck,50,(water.Tair_out-273.15 - water.temp7),'filled','MarkerEdgeColor','k');h1 = scatter(foam.ws_ms,foam.Ck_cor,150,(foam.Tair_out-273.15 - foam.temp7),'filled','s','linew',2,'MarkerEdgeColor','k');grid onxlim([.5 2.8])colormap inferno(32)hc = colorbar;caxis([-10 0])hc.YLabel.String = '\DeltaT_{a-b} [C]';xlabel('U, wind speed [m s^{-1}]')ylabel('C_k, exchange coefficient')set(gca,'fontsi',16)lgd = legend([h1 h2 h3],{'foam','foam-free','Jeong et al., 2012'},'location','best');set(lgd,'fontsi',22)% surface radiometric temperaturefigureclfsubplot(121)  plot(foam.Q_net_CC,-foam.Aim_temp + foam.temp7,'sk','linew',1.5,'markerfacecolor','w') %-(Qad_cool+Qair_lat)  hold on  plot(water.Q_net_CC,-water.Aim_temp + water.temp7,'.k','markersi',16)  xlabel('Q_{E} [W m^{-2}]','fontsi',12)  ylabel('\DeltaT_{skin} [C]','fontsi',12)  set(gca,'fontsi',16)  ylim([0 3.5])  axis square  grid on  legend('foam','foam-free (water)','location','northwest')subplot(122)  plot(foam.Q_net_CC,foam.FWHM/2.355,'sk','linew',1.5,'markerfacecolor','w') %-(Qad_cool+Qair_lat)  hold on  plot(water.Q_net_CC,water.FWHM/2.355,'.k','markersi',16)  xlabel('Q_{E} [W m^{-2}]','fontsi',12)  ylabel('\sigmaT_{skin}  [C]','fontsi',12)  set(gca,'fontsi',16)  grid on  axis square  legend('foam','foam-free','location','northwest')% plot water and foam temp profilesfigureclfsubplot(221)%plot([tempWS(:,[1:4 6 8])]',[0 zTemp([1:3 5 7])],'k.-') %[1:3 5:6][h,ch] = plotColor(num2cell([tempWS(:,[1:4 6:8])]',1),num2cell(repmat([0 zTemp([1:3 5:7])]',1,length(water.Q_net_CC)),1),water.Q_net_CC,'parula',[0 1200],'linew',2);set(gca,'ydir','r','yscale','linear')ylabel('depth [cm]')xlabel('T(z)-T_b [C]')title('foam-free')grid onset(gca,'fontsi',16)axis([-3 .1 0 2])ch.XLabel.String = 'Q_{T} [W m^{-2}]'; ch.Location = 'west';subplot(222)%plot([tempFS(:,[1:4 6 8])]',[0 zTemp([1:3 5 7])],'k.-') %[1:3 5:6][h,ch] = plotColor(num2cell([tempFS(:,[1:4 6:8])]',1),num2cell(repmat([0 zTemp([1:3 5:7])]',1,length(foam.Q_net_CC)),1),foam.Q_net_CC,'parula',[0 1200],'linew',2);xl = xlim;plot(xl,[1.7 1.7],'--k','linew',1.5)text(-2.8,2,'foam layer base','fontsi',12)set(gca,'ydir','r','yscale','linear')ylabel('depth [cm]')xlabel('T(z)-T_b [C]')title('foam')axis([-3 .1 0 2])grid on%ch.XLabel.String = 'Q_{W} [W m^{-2}]';colorbar offset(gca,'fontsi',16)% upper surface bulk gradientsubplot(212)plot(foam.Q_net_CC,(-foam.Aim_temp + foam.temp5)./(zTemp(5)),'sk','linew',1.5,'markerfacecolor','w') %-(Qad_cool+Qair_lat)hold onplot(water.Q_net_CC,(-water.Aim_temp + water.temp5)./(zTemp(5)),'.k','markersi',16)xlabel('Q_{E} [W m^{-2}]')ylabel('-dT/dz  [C cm^{-1}]')set(gca,'fontsi',16)ylim([0 1.1])legend('foam','foam-free','location','northwest')grid on