1 |
gforget |
1.1 |
|
2 |
|
|
doLoad=1; |
3 |
|
|
doGrid=1; |
4 |
|
|
doPlot=1; |
5 |
|
|
|
6 |
|
|
gcmfaces_global;%global variables and paths |
7 |
|
|
|
8 |
|
|
%load insitu data (in MITprof format) |
9 |
|
|
%------------------------------------ |
10 |
|
|
|
11 |
|
|
if doLoad; |
12 |
gforget |
1.2 |
dirIn='release1/MITprof/'; |
13 |
gforget |
1.1 |
%load ctd data set (0-9000m) |
14 |
gforget |
1.2 |
ctd=MITprof_load([dirIn 'ctd_feb2013_model.nc']); |
15 |
gforget |
1.1 |
%load argo data subsets (rectricted to 0-2000m) |
16 |
gforget |
1.2 |
argo1=MITprof_load([dirIn 'argo_feb2013_1992_to_2007_model.nc']); |
17 |
|
|
argo2=MITprof_load([dirIn 'argo_feb2013_2008_to_2010_model.nc']); |
18 |
|
|
argo3=MITprof_load([dirIn 'argo_feb2013_2011_to_2012_model.nc']); |
19 |
gforget |
1.1 |
%concatenate (requires same vertical grid) |
20 |
|
|
argo=MITprof_concat(argo1,argo2); |
21 |
|
|
argo=MITprof_concat(argo,argo3); |
22 |
|
|
end; |
23 |
|
|
|
24 |
|
|
%define global grids (gcmfaces format) |
25 |
|
|
%------------------------------------ |
26 |
|
|
|
27 |
|
|
if doGrid; |
28 |
|
|
%ECCO grid (lat-lon-cap) should be in memory at this stage |
29 |
|
|
mygrid_llc90=mygrid; |
30 |
|
|
|
31 |
|
|
%define lat-lon grid |
32 |
|
|
lon=[-179:2:179]; lat=[-89:2:89]; |
33 |
|
|
[lat,lon] = meshgrid([-89:2:89],[-179:2:179]); |
34 |
|
|
%prepare mygrid for lat-lon with no mask |
35 |
|
|
mygrid_latlon.nFaces=1; |
36 |
|
|
mygrid_latlon.XC=gcmfaces({lon}); mygrid_latlon.YC=gcmfaces({lat}); |
37 |
|
|
mygrid_latlon.dirGrid='none'; |
38 |
|
|
mygrid_latlon.fileFormat='straight'; |
39 |
|
|
mygrid_latlon.ioSize=size(lon); |
40 |
|
|
end; |
41 |
|
|
|
42 |
|
|
%plot number of observations and mean date |
43 |
|
|
%----------------------------------------- |
44 |
|
|
if doPlot==1; |
45 |
|
|
|
46 |
|
|
mygrid=mygrid_latlon; |
47 |
|
|
global mytri; mytri=[]; gcmfaces_bindata; |
48 |
|
|
|
49 |
|
|
figureL; |
50 |
|
|
[tim,nobs]=gcmfaces_bindata(argo.prof_lon,argo.prof_lat,argo.prof_date); |
51 |
|
|
tim0=datenum(1992,1,1); tim=1992+(tim./nobs-tim0)/365; tim(nobs==0)=NaN; |
52 |
|
|
% |
53 |
|
|
subplot(2,2,1); qwckplot(log10(nobs)); |
54 |
|
|
caxis([0 3]); colorbar('horiz'); title('argo log10(#obs)'); |
55 |
|
|
% |
56 |
|
|
subplot(2,2,2); qwckplot(tim); |
57 |
|
|
caxis([1992 2012]); colorbar('horiz'); title('argo mean date'); |
58 |
|
|
% |
59 |
|
|
[tim,nobs]=gcmfaces_bindata(ctd.prof_lon,ctd.prof_lat,ctd.prof_date); |
60 |
|
|
tim0=datenum(1992,1,1); tim=1992+(tim./nobs-tim0)/365; tim(nobs==0)=NaN; |
61 |
|
|
% |
62 |
|
|
subplot(2,2,3); qwckplot(log10(nobs)); |
63 |
|
|
caxis([0 3]); colorbar('horiz'); title('ctd log10(#obs)'); |
64 |
|
|
% |
65 |
|
|
subplot(2,2,4); qwckplot(tim); |
66 |
|
|
caxis([1992 2012]); colorbar('horiz'); title('ctd mean date'); |
67 |
|
|
|
68 |
|
|
end;%if doPlot==1; |
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
%plot individual cruise / instrument tracks (as defined by descr flag) |
73 |
|
|
%-------------------------------------------------------------------- |
74 |
|
|
if doPlot==2; |
75 |
|
|
|
76 |
|
|
mygrid=mygrid_llc90; |
77 |
|
|
global mytri; mytri=[]; gcmfaces_bindata; |
78 |
|
|
|
79 |
|
|
%prof=MITprof_subset(ctd,'lat',[-70 -60],'lon',[-120 -90]); |
80 |
|
|
prof=MITprof_subset(ctd,'lat',[-70 -60]); |
81 |
|
|
list0=prof.list_descr; |
82 |
|
|
list1='rgbmc'; |
83 |
|
|
|
84 |
|
|
figureL; m_map_gcmfaces(mygrid.Depth,3); colormap('gray'); |
85 |
|
|
%for k=1:length(list0); |
86 |
|
|
for k=length(list1):length(list1):length(list0); |
87 |
|
|
list1=circshift(list1,[0 -1]); |
88 |
|
|
prof=MITprof_subset(ctd,'descr',list0{k}); |
89 |
|
|
jj=mod(k,length(list1)); if jj==0; jj=length(list1); end; |
90 |
|
|
[tmp1,II]=sort(prof.prof_date); |
91 |
|
|
l=prof.prof_lon(II); L=prof.prof_lat(II); |
92 |
|
|
m_map_gcmfaces({'plot',l,L,[list1(jj) '.-']},3,{'doHold',1}); |
93 |
|
|
pause(0.1); hold on; |
94 |
|
|
end; |
95 |
|
|
|
96 |
|
|
end;%if doPlot==2; |
97 |
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
gforget |
1.2 |
%compile yearly, box averaged, anomaly from ecco |
101 |
|
|
%----------------------------------------------- |
102 |
gforget |
1.1 |
if doPlot==3; |
103 |
|
|
|
104 |
|
|
yearly_anom_argo=NaN*zeros(3,20); |
105 |
|
|
yearly_anom_ctd=NaN*zeros(3,20); |
106 |
|
|
|
107 |
|
|
%box definition: |
108 |
|
|
l=[-180 180]; L=[-80 -50]; D=[100 200]; |
109 |
|
|
%l=[-120 -90]; L=[-80 -50]; D=[100 200]; |
110 |
|
|
|
111 |
|
|
for yy=1992:2011; |
112 |
|
|
d=[datenum(yy,0,0) datenum(yy+1,0,0)]; |
113 |
|
|
% |
114 |
|
|
prof=MITprof_subset(ctd,'lon',l,'lat',L,'depth',D,'date',d); |
115 |
|
|
anom=prof.prof_T(:)-prof.prof_Testim(:); anom=anom(find(~isnan(anom))); |
116 |
|
|
if length(anom)>0; |
117 |
|
|
yearly_anom_ctd(1,yy-1991)=length(anom); |
118 |
|
|
yearly_anom_ctd(2,yy-1991)=mean(anom); |
119 |
|
|
yearly_anom_ctd(3,yy-1991)=median(anom); |
120 |
|
|
end; |
121 |
|
|
% |
122 |
|
|
prof=MITprof_subset(argo,'lon',l,'lat',L,'depth',D,'date',d); |
123 |
|
|
anom=prof.prof_T(:)-prof.prof_Testim(:); anom=anom(find(~isnan(anom))); |
124 |
|
|
if length(anom)>0; |
125 |
|
|
yearly_anom_argo(1,yy-1991)=length(anom); |
126 |
|
|
yearly_anom_argo(2,yy-1991)=mean(anom); |
127 |
|
|
yearly_anom_argo(3,yy-1991)=median(anom); |
128 |
|
|
end; |
129 |
|
|
end; |
130 |
|
|
|
131 |
|
|
figureL; |
132 |
|
|
subplot(2,1,1); |
133 |
|
|
plot(log10(yearly_anom_ctd(1,:)),'.-'); hold on; |
134 |
|
|
plot(log10(yearly_anom_argo(1,:)),'r.-'); |
135 |
|
|
title('log10(#obs) for ctd (b) and argo (r)'); |
136 |
|
|
subplot(2,1,2); |
137 |
|
|
plot(yearly_anom_ctd(2,:),'.-'); hold on; |
138 |
|
|
plot(yearly_anom_argo(2,:),'r.-'); |
139 |
|
|
plot(yearly_anom_ctd(3,:),'c.-'); hold on; |
140 |
|
|
plot(yearly_anom_argo(3,:),'m.-'); |
141 |
|
|
title('mean/median anomaly for ctd (b/c) and argo (r/m)'); |
142 |
|
|
|
143 |
|
|
end;%if doPlot==3; |
144 |
|
|
|