1 |
gforget |
1.1 |
function [p]=idma_float_plot(nameFloat); |
2 |
|
|
% |
3 |
gforget |
1.4 |
% IDMA_FLOAT_PLOT extracts the time series of one float |
4 |
|
|
% (e.g. '4900828') from argo_feb2013_2008_to_2010_model.nc |
5 |
|
|
% and return the result in MITprof format (p) |
6 |
|
|
% |
7 |
|
|
% Example: [p]=idma_float_plot('4900828'); |
8 |
|
|
% |
9 |
|
|
% Other float examples: '4900829', '4900830', '4900831' |
10 |
|
|
|
11 |
gforget |
1.1 |
|
12 |
|
|
p = genpath('MITprof/'); addpath(p);%TBE |
13 |
|
|
|
14 |
|
|
%load Argo data set: |
15 |
|
|
dirIn='release1/MITprof_release1/'; |
16 |
|
|
nameFile='argo_feb2013_2008_to_2010_model.nc'; |
17 |
|
|
prof=MITprof_load([dirIn nameFile]); |
18 |
|
|
|
19 |
|
|
%isolate one instrument time series: |
20 |
|
|
p=MITprof_subset(prof,'descr',nameFloat); |
21 |
|
|
|
22 |
|
|
%find increasing time order, for plotting: |
23 |
|
|
[tmp1,tt]=sort(p.prof_date); |
24 |
|
|
|
25 |
gforget |
1.2 |
%compute display time and depth axis: |
26 |
|
|
tim=1992+(p.prof_date-datenum([1992 1 1]))/365; |
27 |
|
|
dep=-p.prof_depth; |
28 |
|
|
|
29 |
gforget |
1.1 |
%plot location of profiles: |
30 |
|
|
figureL; |
31 |
|
|
subplot(2,2,1); set(gca,'FontSize',12); |
32 |
|
|
plot(p.prof_lon(tt),p.prof_lat(tt),'.-'); grid on; |
33 |
gforget |
1.2 |
title(['float ' nameFloat ' path']); |
34 |
gforget |
1.1 |
|
35 |
|
|
%plot T time series at select depths: |
36 |
|
|
subplot(2,2,2); set(gca,'FontSize',12); |
37 |
|
|
kk=2; d=num2str(round(p.prof_depth(kk))); |
38 |
gforget |
1.2 |
o=p.prof_T(:,kk); |
39 |
|
|
o(p.prof_Tweight(:,kk)==0)=NaN; |
40 |
|
|
m=p.prof_Testim(:,kk); |
41 |
|
|
plot(tim(tt),o(tt),'b.-'); hold on; |
42 |
|
|
plot(tim(tt),m(tt),'r.-'); grid on; |
43 |
|
|
title(['T at ' d 'm']); legend('Argo','ECCOv4'); |
44 |
gforget |
1.1 |
|
45 |
|
|
subplot(2,2,4); set(gca,'FontSize',12); |
46 |
gforget |
1.2 |
kk=2; d=num2str(round(p.prof_depth(kk))); |
47 |
|
|
o=p.prof_S(:,kk); |
48 |
|
|
o(p.prof_Sweight(:,kk)==0)=NaN; |
49 |
|
|
m=p.prof_Sestim(:,kk); |
50 |
|
|
plot(tim(tt),o(tt),'b.-'); hold on; |
51 |
|
|
plot(tim(tt),m(tt),'r.-'); grid on; |
52 |
|
|
title(['S at ' d 'm']); legend('Argo','ECCOv4'); |
53 |
gforget |
1.1 |
|
54 |
|
|
%plot S-T diagram: |
55 |
|
|
subplot(2,2,3); set(gca,'FontSize',12); |
56 |
gforget |
1.2 |
S=p.prof_S; S(p.prof_Sweight(:,kk)==0)=NaN; |
57 |
|
|
T=p.prof_T; T(p.prof_Tweight(:,kk)==0)=NaN; |
58 |
|
|
plot(S(:),T(:),'b.'); hold on; |
59 |
gforget |
1.1 |
plot(p.prof_Sestim(:),p.prof_Testim(:),'r.'); hold on; |
60 |
|
|
xlabel('salinity'); ylabel('temperature'); |
61 |
gforget |
1.2 |
grid on; title('T-S profiles'); legend('Argo','ECCOv4'); |
62 |
gforget |
1.1 |
|
63 |
gforget |
1.2 |
figureL; |
64 |
|
|
%display temperature |
65 |
|
|
subplot(2,1,1); set(gca,'FontSize',12); |
66 |
|
|
o=p.prof_T; |
67 |
|
|
o(p.prof_Tweight==0)=NaN; |
68 |
|
|
[y,x]=meshgrid(dep,tim); |
69 |
|
|
pcolor(x(tt,:),y(tt,:),o(tt,:)); |
70 |
|
|
colorbar; shading flat; title(['Argo T']); |
71 |
|
|
%display salinity |
72 |
|
|
subplot(2,1,2); set(gca,'FontSize',12); |
73 |
|
|
o=p.prof_S; |
74 |
|
|
o(p.prof_Sweight==0)=NaN; |
75 |
|
|
[y,x]=meshgrid(dep,tim); |
76 |
|
|
pcolor(x(tt,:),y(tt,:),o(tt,:)); |
77 |
|
|
colorbar; shading flat; title(['Argo S']); |
78 |
gforget |
1.1 |
|