1 |
function [data,xax,yax,time,pltslc] = ... |
function [data,xax,yax,time,pltslc] = ... |
2 |
DiagLoad(fln,trl,dat,dad,grd,itr,tst,flu,ddf,gdf,avg,slc,pst,... |
DiagLoad(fln,trl,dat,dad,grd,itr,tst,flu,ddf,gdf,avg,slc,pst,... |
3 |
LoadGridData,DiagDebug,GridSuffix,ZcordFile,Index,Dim,... |
LoadGridData,DiagDebug,GridSuffix,ZcordFile,Index,Dim,... |
4 |
Grads,Year0Iter,Months); |
Grads,Year0Iter,SecPerYear,Months); |
5 |
|
|
6 |
|
|
7 |
% Load parameters. |
% Load parameters. |
25 |
else , mnchandle = 'tave.*' ; end |
else , mnchandle = 'tave.*' ; end |
26 |
elseif isequal(dat,'Ins') |
elseif isequal(dat,'Ins') |
27 |
filesuffix = ''; mnchandle = 'state.*'; |
filesuffix = ''; mnchandle = 'state.*'; |
28 |
|
elseif isequal(dat(1:2),'Mn') |
29 |
|
filesuffix = ''; |
30 |
|
if ismember(dat,{'MnA','MnO'}), mnchandle = 'monitor.*'; end |
31 |
|
if isequal(dat,'MnI'), mnchandle = 'monitor_sice.*'; end |
32 |
|
if isequal(dat,'MnL'), mnchandle = 'monitor_land.*'; end |
33 |
elseif ismember(dat,{'','Non','None'}) |
elseif ismember(dat,{'','Non','None'}) |
34 |
filesuffix = ''; mnchandle = ''; |
filesuffix = ''; mnchandle = ''; |
35 |
else |
else |
51 |
% Open grads files |
% Open grads files |
52 |
if ~isequal(Grads,0) |
if ~isequal(Grads,0) |
53 |
if DiagDebug, disp([' Debug -- Loading GRADS field.']); end |
if DiagDebug, disp([' Debug -- Loading GRADS field.']); end |
54 |
[data,xax,yax,zax,months,time,dim] = DiagLoadGradsData(Grads,dad,fln,DiagDebug); |
[data,xax,yax,zax,months,time,dim] = ... |
55 |
|
DiagLoadGradsData(Grads,dad,fln,DiagDebug); |
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 |
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 |
|
|
66 |
|
% Load monitor data. |
67 |
|
elseif isequal(dat(1:2),'Mn') |
68 |
|
[data,time] = ... |
69 |
|
DiagLoadMonitor(fln,mnchandle,dad,itr,tst,SecPerYear,DiagDebug); |
70 |
|
xax = time; yax = NaN; pltslc = 'timfld'; |
71 |
|
|
72 |
% Load AIM physics data. The data is all stuffed into one file called |
% Load AIM physics data. The data is all stuffed into one file called |
73 |
% 'aimPhy' which currently only comes in MDS format. When loading a field, |
% 'aimPhy' which currently only comes in MDS format. When loading a field, |
80 |
% stresses (on atmosphere) must converted to a lat-lon grid. |
% stresses (on atmosphere) must converted to a lat-lon grid. |
81 |
elseif ismember(fln,aimparameters) |
elseif ismember(fln,aimparameters) |
82 |
if isequal(ddf,'MNC') |
if isequal(ddf,'MNC') |
83 |
error('Aim physics reader not set to hande ''MNC'' data format.') |
error('Aim physics reader not set to handle ''MNC'' data format.') |
84 |
end |
end |
85 |
data = DiagLoad_Local('aimPhy',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
data = DiagLoad_Local('aimPhy',dat,dad,grd,itr,ddf,filesuffix,mnchandle); |
86 |
if isequal(fln,'TotP') |
if isequal(fln,'TotP') |