56 |
if DiagDebug, disp([' Debug -- ''data'' size after load: ',mat2str(size(data))]); end |
if DiagDebug, disp([' Debug -- ''data'' size after load: ',mat2str(size(data))]); end |
57 |
data = DiagAverage(data,fln,avg,months,ddf,dim); |
data = DiagAverage(data,fln,avg,months,ddf,dim); |
58 |
if DiagDebug, disp([' Debug -- ''data'' size after averaging: ',mat2str(size(data))]); end |
if DiagDebug, disp([' Debug -- ''data'' size after averaging: ',mat2str(size(data))]); end |
59 |
if isequal(slc,'Sur') |
% if isequal(slc,'Sur') |
60 |
data = data'; |
% data = data'; |
61 |
pltslc='lonlat'; |
% pltslc='lonlat'; |
62 |
else |
% else |
63 |
error('Loading grads data only set to handle surface plots!'); |
% error('Loading grads data only set to handle surface plots!'); |
64 |
end |
% end |
65 |
|
[data,xax,yax,pltslc] = ... |
66 |
|
DiagSliceGradsData(fln,flu,slc,data,xax,yax,zax); |
67 |
|
|
68 |
% Load monitor data. |
% Load monitor data. |
69 |
elseif isequal(dat(1:2),'Mn') |
elseif isequal(dat(1:2),'Mn') |
191 |
V = DiagAverage(V,fln,avg,months,ddf,Dim); |
V = DiagAverage(V,fln,avg,months,ddf,Dim); |
192 |
[XC,XG,YC,YG,Ylat,ZC,ZG,RAC,drC,drF,HFacC,HFacW,HFacS,dxG,dyG,dxC,dyC] = ... |
[XC,XG,YC,YG,Ylat,ZC,ZG,RAC,drC,drF,HFacC,HFacW,HFacS,dxG,dyG,dxC,dyC] = ... |
193 |
DiagLoadGridData(LoadGridData,grd,gdf,flu,GridSuffix,ZcordFile); |
DiagLoadGridData(LoadGridData,grd,gdf,flu,GridSuffix,ZcordFile); |
194 |
%[U,V]=uvcube2latlon(XC,YC,U,V,XL,YL); |
[U,V]=uvcube2latlon(XC,YC,U,V,XL,YL); |
195 |
if ismember(fln,{'U','uVel','fizhi_U'}) |
if ismember(fln,{'U','uVel','fizhi_U'}) |
196 |
data = U; |
data = U; |
197 |
elseif ismember(fln,{'V','vVel','fizhi_V'}) |
elseif ismember(fln,{'V','vVel','fizhi_V'}) |
372 |
if DiagDebug, disp([' Debug -- ''data'' size after vector manipulation: ',mat2str(size(data))]); end |
if DiagDebug, disp([' Debug -- ''data'' size after vector manipulation: ',mat2str(size(data))]); end |
373 |
else |
else |
374 |
% Sequence here for Vector = 0 |
% Sequence here for Vector = 0 |
375 |
if ~isequal(Index,0) |
if ~isequal(Index,0) & isequal(size(Index),[1 1]) & isequal(sign(Index),1) |
376 |
if isequal(Dim,2), data = squeeze(data(:,:,Index,:)); |
if isequal(Dim,2), data = squeeze(data(:,:,Index,:)); |
377 |
elseif isequal(Dim,3), data = squeeze(data(:,:,:,Index,:)); end |
elseif isequal(Dim,3), data = squeeze(data(:,:,:,Index,:)); end |
378 |
|
elseif isequal(size(Index),[1 1]) & ~isequal(sign(Index),1) |
379 |
|
if isequal(Dim,2), data = sign(Index(1)).*squeeze(data(:,:,abs(Index(1)),:)); |
380 |
|
elseif isequal(Dim,3), data = sign(Index(1)).*squeeze(data(:,:,:,abs(Index(1)),:)); end |
381 |
|
elseif isequal(size(Index),[1 2]) |
382 |
|
if isequal(Dim,2), data = sign(Index(1)).*squeeze(data(:,:,abs(Index(1)),:)) + sign(Index(2)).*squeeze(data(:,:,abs(Index(2)),:)); |
383 |
|
elseif isequal(Dim,3), data = sign(Index(1)).*squeeze(data(:,:,:,abs(Index(1)),:)) + sign(Index(2)).*squeeze(data(:,:,:,abs(Index(2)),:)); end |
384 |
end |
end |
385 |
if DiagDebug, disp([' Debug -- ''data'' size after indexing: ',mat2str(size(data))]); end |
if DiagDebug, disp([' Debug -- ''data'' size after indexing: ',mat2str(size(data))]); end |
386 |
data = DiagAverage(data,fln,avg,months,ddf,Dim); |
data = DiagAverage(data,fln,avg,months,ddf,Dim); |