close all clear all % --- PLOT GC OCT 2016 load GC_Oct.mat Hs_sta=Hs_sta; Hs_mod=Hs_model'; time_sta=time_sta'; time_mod=time_model; tend_mod=datenum(2017,10,1)+time_mod(end)-1; Hs_mod(end)=2*Hs_mod(end-1)-Hs_mod(end-2); Hs_mod=interp1(time_mod,Hs_mod,time_sta,'pchip'); time_sta=datenum(2017,10,1)+time_sta-1; Hs_mod(time_sta>tend_mod)=NaN; % --- figure('position',[100 100 900 500]) subplot(4,1,1) h=plot(time_sta,Hs_sta,time_sta,Hs_mod); set(h,'linewidth',3) legend('data','model') text(time_sta(1),1.75,'GO CONG - Oct 2016','fontsize',14) axis([-Inf Inf 0 2]) datetick('x','dd/mm') grid on set(gca,'fontsize',14) %-------------------------------------------------------- % --- PLOT GC FEB/MAR 2017 load MY_SRC/DATA_OBS/GC_Feb.mat Hs_sta_feb=Hs_sta/sqrt(2)+0.1; % %Hs_mod_feb=Hs_model'; % imin(13)=120; imax(13)=220; jmin(13)=615; jmax(13)=615; % 'Go Cong '; imin(14)=120; imax(14)=220; jmin(14)=650; jmax(14)=650; % 'Go Cong '; Imin=imin(iz); Imax=imax(iz); Jmin=jmin(iz); Jmax=jmax(iz); lon(Jmin,Imin); lon(Jmax,Imin); lat(Jmin,Imin); lat(Jmax,Imin); fname='CROCO_FILES/croco_his_Y2017M02.nc'; nc=netcdf(fname); Awave=nc{'hrm'}(:); Hs_model=squeeze(Awave(:,:)); close(nc) % time_sta_feb=time_sta'; time_mod_feb=time_model; D=(time_mod_feb>28.4); time_mod_feb(D)=[]; Hs_mod_feb(D)=[]; %figure %plot(time_sta_feb,Hs_sta_feb,time_mod_feb,Hs_mod_feb) %legend('data','model') load GC_Mar.mat Hs_sta_mar=Hs_sta; Hs_mod_mar=Hs_model'; time_sta_mar=time_sta'; time_mod_mar=time_model; Hs_mod_mar(1)=[]; time_mod_mar(1)=[]; %Hs_sta_mar(time_sta_mar<3.8)=NaN; %figure %plot(time_sta_mar,Hs_sta_mar,time_mod_mar,Hs_mod_mar) %legend('data','model') time_sta_mar=time_sta_mar+27+1/24; time_mod_mar=time_mod_mar+27+1/24; Hs_sta=cat(1,Hs_sta_feb,Hs_sta_mar); Hs_mod=cat(1,Hs_mod_feb,Hs_mod_mar); time_sta=cat(1,time_sta_feb,time_sta_mar); time_mod=cat(1,time_mod_feb,time_mod_mar); Hs_mod=interp1(time_mod,Hs_mod,time_sta,'pchip'); time_sta=datenum(2017,2,1)+time_sta-1; % --- %figure('position',[100 100 900 400]) subplot(4,1,2) h=plot(time_sta,Hs_sta,time_sta,Hs_mod); set(h,'linewidth',3) legend('data','model') text(time_sta(1),1.75,'GO CONG - Feb/Mar 2017','fontsize',14) axis([-Inf Inf 0 2]) datetick('x','dd/mm') grid on set(gca,'fontsize',14) %======================================================== % --- PLOT UMINH OCT 2016 load UM_Oct.mat Hs_sta=Hs_sta; Hs_mod=Hs_model'; time_sta=time_sta'; time_mod=time_model; tend_mod=datenum(2017,10,1)+time_mod(end)-1; Hs_mod(end)=2*Hs_mod(end-1)-Hs_mod(end-2); Hs_mod=interp1(time_mod,Hs_mod,time_sta,'pchip'); time_sta=datenum(2017,10,1)+time_sta-1; Hs_mod(time_sta>tend_mod)=NaN; % --- %figure('position',[100 100 900 400]) subplot(4,1,3) h=plot(time_sta,Hs_sta,time_sta,Hs_mod); set(h,'linewidth',3) legend('data','model') text(time_sta(1),1.75,'U-MINH - Oct 2016','fontsize',14) axis([-Inf Inf 0 2]) datetick('x','dd/mm') grid on set(gca,'fontsize',14) %---------------------------------------------------- % --- PLOT UMINH FEB/MAR 2017 load UM_Feb.mat Hs_sta_feb=Hs_sta; Hs_mod_feb=Hs_model'; time_sta_feb=time_sta'; time_mod_feb=time_model; D=(time_mod_feb>28.4); time_mod_feb(D)=[]; Hs_mod_feb(D)=[]; %figure %plot(time_sta_feb,Hs_sta_feb,time_mod_feb,Hs_mod_feb) %legend('data','model') load UM_Mar.mat Hs_sta_mar=Hs_sta; Hs_mod_mar=Hs_model'; time_sta_mar=time_sta'; time_mod_mar=time_model; Hs_mod_mar(1)=[]; time_mod_mar(1)=[]; %Hs_sta_mar(time_sta_mar<3.8)=NaN; %figure %plot(time_sta_mar,Hs_sta_mar,time_mod_mar,Hs_mod_mar) %legend('data','model') time_sta_mar=time_sta_mar+27+1/24; time_mod_mar=time_mod_mar+27+1/24; Hs_sta=cat(1,Hs_sta_feb,Hs_sta_mar); Hs_mod=cat(1,Hs_mod_feb,Hs_mod_mar); time_sta=cat(1,time_sta_feb,time_sta_mar); time_mod=cat(1,time_mod_feb,time_mod_mar); Hs_mod=interp1(time_mod,Hs_mod,time_sta,'pchip'); time_sta=datenum(2017,2,1)+time_sta-1; % --- %figure('position',[100 100 900 400]) subplot(4,1,4) h=plot(time_sta,Hs_sta,time_sta,Hs_mod); set(h,'linewidth',3) legend('data','model') text(time_sta(1),1.75,'U-MINH - Feb/Mar 2017','fontsize',14) axis([-Inf Inf 0 2]) datetick('x','dd/mm') grid on set(gca,'fontsize',14) %------------------------- export_fig -transparent wave_valid.pdf