%author : Gael Forget %date : 07/25/2005 %object : display information from a doubtful profiler %remark : works with the outputs of profiles_prep_write_nc %parameters of the check : cur_pnum='1900278'; %identification number of the instrument date_ref=[2004 8 1 0 0 0]; %reference date to be plot as a black line caxis_anoms=[1 0.2]; %limits for the colors for T and S misfits depth_max=2500; %maximum depth ploted eval(['!grep ' cur_pnum ' /net/altix3700/raid4/gforget/ARGO/ifremer/ar_greylist.txt']); global dataIsLoaded; repr='/net/altix3700/raid4/gforget/ARGO/ifremer/ECCOformat/'; filename='ARGOifremerEDW'; %load the data: if isempty(dataIsLoaded) model_time0=jul_0h([2002 01 01 06 00 00]); eval(['ncload ' repr filename 'CHECK.nc prof_T prof_S;']); prof_Tequi=prof_T; prof_Sequi=prof_S; eval(['ncload ' repr filename '.nc']); eval(['ncload ' repr filename 'CHECK.nc prof_Tweight prof_Sweight prof_Ttest prof_Stest;']); prof_descr(prof_descr==32)=0; prof_descr=char(prof_descr); bb=prof_descr'; cc=size(bb); prof_descr2=reshape(bb,1,cc(1)*cc(2)); prof_date00=prof_YYYYMMDD; prof_date00=prof_date00-1e4*floor(prof_date00*1e-4); prof_date=[1e-4*(prof_YYYYMMDD-prof_date00) floor(prof_date00*1e-2)]; prof_date00=prof_date00-1e2*floor(prof_date00*1e-2); prof_date=[prof_date prof_date00]; prof_date00=prof_HHMMSS; prof_date00=prof_date00-1e4*floor(prof_date00*1e-4); prof_date=[prof_date 1e-4*(prof_HHMMSS-prof_date00) floor(prof_date00*1e-2)]; prof_date00=prof_date00-1e2*floor(prof_date00*1e-2); prof_date=[prof_date prof_date00]; prof_date=(jul_0h(prof_date)-model_time0); dataIsLoaded=1; end dd=horzcat(cur_pnum,char(zeros(1,size(prof_descr,2)-length(cur_pnum)))); ee=strfind(prof_descr2,dd); ee=(ee-1)/30+1; list_prof=ee(find(ee==round(ee))); [tmp3,tmp4]=sort(prof_date(list_prof)); list_prof=list_prof(tmp4); %preparation of the plot : xplot=prof_date(list_prof)*ones(1,length(depth)); yplot=-ones(length(list_prof),1)*depth'; tmp_axis=[min(xplot(:,1)) max(xplot(:,1)) -depth_max 0]; date_ref=jul_0h(date_ref)-model_time0; %the plot itself : figure; set(gcf,'Units','normalized'); set(gcf,'Position',[0.1 0.3 0.8 0.6]); colormap(jet(16)); suptitle(['profiler nb ' cur_pnum]); zplot=prof_T(list_prof,:); zplot(zplot<-1000)=NaN; subplot(3,2,1); pcolor(xplot,yplot,zplot); colorbar; shading flat; axis(tmp_axis);title('observed temperature'); hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2); ylabel('depth'); zplot=zplot-prof_Tequi(list_prof,:); zplot(prof_Tequi(list_prof,:)<-1000)=NaN; subplot(3,2,3); pcolor(xplot,yplot,zplot); caxis([-1 1]*caxis_anoms(1)); colorbar; shading flat; axis(tmp_axis); title('observed temperature anomaly'); hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2); ylabel('depth'); zplot=prof_Ttest(list_prof,:); zplot(zplot<-1000)=NaN; subplot(3,2,5); pcolor(xplot,yplot,zplot); caxis([0 8]); colorbar; shading flat; axis(tmp_axis);title('data rejected (values>0)'); hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2); xlabel('day'); ylabel('depth'); zplot=prof_S(list_prof,:); zplot(zplot<-1000)=NaN; subplot(3,2,2); pcolor(xplot,yplot,zplot); colorbar; shading flat; axis(tmp_axis);title('observed salinity'); hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2); ylabel('depth'); zplot=zplot-prof_Sequi(list_prof,:); zplot(prof_Sequi(list_prof,:)<-1000)=NaN; subplot(3,2,4); pcolor(xplot,yplot,zplot); caxis([-1 1]*caxis_anoms(2)); colorbar; shading flat; axis(tmp_axis); title('observed salinity anomaly'); hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2); ylabel('depth'); zplot=prof_Stest(list_prof,:); zplot(zplot<-1000)=NaN; subplot(3,2,6); pcolor(xplot,yplot,zplot); caxis([0 7]); colorbar; shading flat; axis(tmp_axis);title('data rejected (values>0)'); hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2); xlabel('day'); ylabel('depth');