--- MITgcm_contrib/enderton/Diagnostics/DiagLoad.m 2005/02/02 16:20:12 1.5 +++ MITgcm_contrib/enderton/Diagnostics/DiagLoad.m 2005/02/07 05:31:45 1.6 @@ -1,7 +1,7 @@ function [data,xax,yax,time,pltslc] = ... DiagLoad(fln,trl,dat,dad,grd,itr,tst,flu,ddf,gdf,avg,slc,pst,... LoadGridData,DiagDebug,GridSuffix,ZcordFile,Index,Dim,... - Grads,Year0Iter,Months); + Grads,Year0Iter,SecPerYear,Months); % Load parameters. @@ -25,6 +25,11 @@ else , mnchandle = 'tave.*' ; end elseif isequal(dat,'Ins') filesuffix = ''; mnchandle = 'state.*'; +elseif isequal(dat(1:2),'Mn') + filesuffix = ''; + if ismember(dat,{'MnA','MnO'}), mnchandle = 'monitor.*'; end + if isequal(dat,'MnI'), mnchandle = 'monitor_sice.*'; end + if isequal(dat,'MnL'), mnchandle = 'monitor_land.*'; end elseif ismember(dat,{'','Non','None'}) filesuffix = ''; mnchandle = ''; else @@ -46,7 +51,8 @@ % Open grads files if ~isequal(Grads,0) if DiagDebug, disp([' Debug -- Loading GRADS field.']); end - [data,xax,yax,zax,months,time,dim] = DiagLoadGradsData(Grads,dad,fln,DiagDebug); + [data,xax,yax,zax,months,time,dim] = ... + DiagLoadGradsData(Grads,dad,fln,DiagDebug); if DiagDebug, disp([' Debug -- ''data'' size after load: ',mat2str(size(data))]); end data = DiagAverage(data,fln,avg,months,ddf,dim); if DiagDebug, disp([' Debug -- ''data'' size after averaging: ',mat2str(size(data))]); end @@ -56,7 +62,12 @@ else error('Loading grads data only set to handle surface plots!'); end - + +% Load monitor data. +elseif isequal(dat(1:2),'Mn') + [data,time] = ... + DiagLoadMonitor(fln,mnchandle,dad,itr,tst,SecPerYear,DiagDebug); + xax = time; yax = NaN; pltslc = 'timfld'; % Load AIM physics data. The data is all stuffed into one file called % 'aimPhy' which currently only comes in MDS format. When loading a field, @@ -69,7 +80,7 @@ % stresses (on atmosphere) must converted to a lat-lon grid. elseif ismember(fln,aimparameters) if isequal(ddf,'MNC') - error('Aim physics reader not set to hande ''MNC'' data format.') + error('Aim physics reader not set to handle ''MNC'' data format.') end data = DiagLoad_Local('aimPhy',dat,dad,grd,itr,ddf,filesuffix,mnchandle); if isequal(fln,'TotP')