/[MITgcm]/MITgcm_contrib/gael/profilesMatlabProcessing/profiles_prep_instr_inspect2.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/profilesMatlabProcessing/profiles_prep_instr_inspect2.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu May 13 19:51:13 2010 UTC (15 years, 2 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
moving to profiles_process_argo_v1

1 %author : Gael Forget
2 %date : 07/25/2005
3 %object : display information from a doubtful profiler
4 %remark : works with the outputs of profiles_prep_write_nc
5
6 %parameters of the check :
7 %cur_pnum='1900278'; %identification number of the instrument
8 %date_ref=[2004 8 1 0 0 0]; %reference date to be plot as a black line
9 caxis_anoms=[1 0.2]; %limits for the colors for T and S misfits
10 depth_max=2500; %maximum depth ploted
11
12
13 global dataIsLoaded;
14
15 repr='/net/altix3700/raid4/gforget/ARGO/ifremer/ECCOformat/';
16 filename='ARGOifremerEDW';
17 %load the data:
18 if isempty(dataIsLoaded)
19
20 model_time0=jul_0h([2002 01 01 06 00 00]);
21
22 eval(['ncload ' repr filename 'CHECK.nc prof_T prof_S;']); prof_Tequi=prof_T; prof_Sequi=prof_S;
23 eval(['ncload ' repr filename '.nc']);
24 eval(['ncload ' repr filename 'CHECK.nc prof_Tweight prof_Sweight prof_Ttest prof_Stest;']);
25
26 prof_descr(prof_descr==32)=0; prof_descr=char(prof_descr);
27 bb=prof_descr'; cc=size(bb);
28 prof_descr2=reshape(bb,1,cc(1)*cc(2));
29
30 prof_date00=prof_YYYYMMDD;
31 prof_date00=prof_date00-1e4*floor(prof_date00*1e-4); prof_date=[1e-4*(prof_YYYYMMDD-prof_date00) floor(prof_date00*1e-2)];
32 prof_date00=prof_date00-1e2*floor(prof_date00*1e-2); prof_date=[prof_date prof_date00];
33 prof_date00=prof_HHMMSS;
34 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)];
35 prof_date00=prof_date00-1e2*floor(prof_date00*1e-2); prof_date=[prof_date prof_date00];
36 prof_date=(jul_0h(prof_date)-model_time0);
37
38 dataIsLoaded=1;
39 end
40
41
42 figure;
43 set(gcf,'Units','normalized'); set(gcf,'Position',[0.1 0.3 0.8 0.6]); colormap(jet(16));
44
45
46 fidgrey=fopen('/net/altix3700/raid4/gforget/ARGO/ifremer/ar_greylist.txt','rt');
47 tmp1=fgetl(fidgrey);
48 cur_pnum_old='';
49 while ~feof(fidgrey);
50 tmp1=fgetl(fidgrey); tmp2=strfind(tmp1,',');
51 cur_pnum=double(tmp1(1:tmp2(1)-1));
52 cur_pnum=cur_pnum(find(cur_pnum~=0&cur_pnum~=32));
53 cur_pnum=char(cur_pnum);
54 if ~strcmp(cur_pnum,cur_pnum_old)
55 cur_pnum_old=cur_pnum;
56 date_ref=double(tmp1(tmp2(2)+1:tmp2(3)-1));
57 date_ref=date_ref(find(date_ref~=0&date_ref~=32));
58 date_ref=char(date_ref);
59 date_ref=[str2num(date_ref(1:4)) str2num(date_ref(5:6)) str2num(date_ref(7:8)) 0 0 0];
60
61 eval(['!grep ' cur_pnum ' /net/altix3700/raid4/gforget/ARGO/ifremer/ar_greylist.txt']);
62
63
64 dd=horzcat(cur_pnum,char(zeros(1,size(prof_descr,2)-length(cur_pnum))));
65 ee=strfind(prof_descr2,dd); ee=(ee-1)/30+1;
66 list_prof=ee(find(ee==round(ee)));
67 [tmp3,tmp4]=sort(prof_date(list_prof)); list_prof=list_prof(tmp4);
68
69 %preparation of the plot :
70 xplot=prof_date(list_prof)*ones(1,length(depth)); yplot=-ones(length(list_prof),1)*depth';
71 tmp_axis=[min(xplot(:,1)) max(xplot(:,1)) -depth_max 0];
72 date_ref=jul_0h(date_ref)-model_time0;
73
74
75 %the plot itself :
76 suptitle(['profiler nb ' cur_pnum]);
77
78 zplot=prof_T(list_prof,:); zplot(zplot<-1000)=NaN;
79 subplot(3,2,1); pcolor(xplot,yplot,zplot); colorbar; shading flat;
80 axis(tmp_axis);title('observed temperature');
81 hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2);
82 ylabel('depth');
83 zplot=zplot-prof_Tequi(list_prof,:); zplot(prof_Tequi(list_prof,:)<-1000)=NaN;
84 subplot(3,2,3); pcolor(xplot,yplot,zplot); caxis([-1 1]*caxis_anoms(1)); colorbar; shading flat;
85 axis(tmp_axis); title('observed temperature anomaly');
86 hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2);
87 ylabel('depth');
88 zplot=prof_Ttest(list_prof,:); zplot(zplot<-1000)=NaN;
89 subplot(3,2,5); pcolor(xplot,yplot,zplot); caxis([0 8]); colorbar; shading flat;
90 axis(tmp_axis);title('data rejected (values>0)');
91 hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2);
92 xlabel('day'); ylabel('depth');
93
94 zplot=prof_S(list_prof,:); zplot(zplot<-1000)=NaN;
95 subplot(3,2,2); pcolor(xplot,yplot,zplot); colorbar; shading flat;
96 axis(tmp_axis);title('observed salinity');
97 hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2);
98 ylabel('depth');
99 zplot=zplot-prof_Sequi(list_prof,:); zplot(prof_Sequi(list_prof,:)<-1000)=NaN;
100 subplot(3,2,4); pcolor(xplot,yplot,zplot); caxis([-1 1]*caxis_anoms(2)); colorbar; shading flat;
101 axis(tmp_axis); title('observed salinity anomaly');
102 hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2);
103 ylabel('depth');
104 zplot=prof_Stest(list_prof,:); zplot(zplot<-1000)=NaN;
105 subplot(3,2,6); pcolor(xplot,yplot,zplot); caxis([0 7]); colorbar; shading flat;
106 axis(tmp_axis);title('data rejected (values>0)');
107 hold on;plot([date_ref date_ref],[-depth_max 0],'k','LineWidth',2);
108 xlabel('day'); ylabel('depth');
109
110 pause;
111 clf;
112
113 end%if ~strcmp(cur_pnum,cur_pnum_old)
114 end%while ~feof(fidgrey);
115 fclose(fidgrey)
116
117

  ViewVC Help
Powered by ViewVC 1.1.22