16 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
17 |
|
|
18 |
% Currently the function can handle time averages (dat=='Tav'), which must |
% Currently the function can handle time averages (dat=='Tav'), which must |
19 |
% be monthly mean, and instantaneous data (dat=='Int'). There is also an |
% be monthly mean, and instantaneous data (dat=='Ins'). There is also an |
20 |
% option for generic data (dat=='Non') which, if the field name is exactly |
% option for generic data (dat=='Non') which, if the field name is exactly |
21 |
% specified, is able to load any type file. |
% specified, is able to load any type file. |
22 |
if isequal(dat,'Tav') |
if isequal(dat,'Tav') |
46 |
% Open grads files |
% Open grads files |
47 |
if ~isequal(Grads,0) |
if ~isequal(Grads,0) |
48 |
if DiagDebug, disp([' Debug -- Loading GRADS field.']); end |
if DiagDebug, disp([' Debug -- Loading GRADS field.']); end |
49 |
[data,xax,yax,zax,months,time,dim] = DiagLoadGradsData(Grads,dad,fln); |
[data,xax,yax,zax,months,time,dim] = DiagLoadGradsData(Grads,dad,fln,DiagDebug); |
50 |
if DiagDebug, disp([' Debug -- ''data'' size after load: ',mat2str(size(data))]); end |
if DiagDebug, disp([' Debug -- ''data'' size after load: ',mat2str(size(data))]); end |
51 |
data = DiagAverage(data,fln,avg,months,ddf,dim); |
data = DiagAverage(data,fln,avg,months,ddf,dim); |
52 |
if DiagDebug, disp([' Debug -- ''data'' size after averaging: ',mat2str(size(data))]); end |
if DiagDebug, disp([' Debug -- ''data'' size after averaging: ',mat2str(size(data))]); end |
166 |
if isequal(dat,'Tav') |
if isequal(dat,'Tav') |
167 |
U = DiagLoad_Local('uVel',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
U = DiagLoad_Local('uVel',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
168 |
V = DiagLoad_Local('vVel',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
V = DiagLoad_Local('vVel',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
169 |
else isequal(dat,'Int') |
else isequal(dat,'Ins') |
170 |
U = DiagLoad_Local('U',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
U = DiagLoad_Local('U',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
171 |
V = DiagLoad_Local('V',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
V = DiagLoad_Local('V',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
172 |
end |
end |
206 |
if isequal(dat,'Tav') |
if isequal(dat,'Tav') |
207 |
U = DiagLoad_Local('uVel',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
U = DiagLoad_Local('uVel',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
208 |
V = DiagLoad_Local('vVel',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
V = DiagLoad_Local('vVel',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
209 |
else isequal(dat,'Int') |
else isequal(dat,'Ins') |
210 |
U = DiagLoad_Local('U',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
U = DiagLoad_Local('U',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
211 |
V = DiagLoad_Local('V',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
V = DiagLoad_Local('V',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
212 |
end |
end |