Parent Directory
|
Revision Log
|
Revision Graph
|
Patch
--- MITgcm_contrib/enderton/Diagnostics/DiagSlice.m 2005/07/05 18:57:48 1.5
+++ MITgcm_contrib/enderton/Diagnostics/DiagSlice.m 2005/08/10 20:17:17 1.6
@@ -48,23 +48,23 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% All surface plots are direct cube sphere outputs, and therefore must have
-% the dimensions defined in 'hres' in 'DiagLoadGridData'. This is commonly
-% [192,32]. If the 'pst' is 'Grd' or 'Int', everything is already all set
-% since those handle the cubed sphere data. If the 'pst' is 'Con' or 'Cnf',
-% convert data to a lat-lon grid so that it can easily be contours.
+% the dimensions of the cube grid data. If the 'pst' is 'Grd' or 'Int',
+% everything is already all set since those handle the cubed sphere data.
+% If the 'pst' is 'Con' or 'Cnf', convert data to a lat-lon grid so that it
+% can easily be contoured.
if isequal(slc,'Sur')
if ismember(fln,{'TX','TY','USTR','VSTR'}) | ~isequal(Vector,0)
data = data'; xax = XL; yax = YL;
- elseif ~isequal(datasize,[faces*hres,hres])
+ elseif ~isequal(datasize,size(XC))
error('Incorrect dimensions for slc: ',slc);
else
if ismember(pst,{'Grd','Int'})
if isequal(pst,'Grd'),
- xax = XG(1:faces*hres,1:hres);
- yax = YG(1:faces*hres,1:hres);
+ xax = XG;
+ yax = YG;
elseif isequal(pst,'Int'),
- xax = XC(1:faces*hres,1:hres);
- yax = YC(1:faces*hres,1:hres);
+ xax = XC;
+ yax = YC;
end
elseif ismember(pst,{'Con','Cnf'})
data = cube2latlon(XC,YC,data,XL,YL)';
@@ -81,14 +81,14 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% When computing a zonal average, there are many different options for the
-% initial data. If the data is cube-sphere, it could be of the size
-% [hres,z-axis length] or just [hres]. In either case, 'calc_ZonAv_CS' (a
+% initial data. If the data is cube-sphere, it could be the shape of XC,
+% possibly also with a vertical axis. In either case, 'calc_ZonAv_CS' (a
% nifty zonally averaging script from JMC) is called to compute the zonal
% average for raw cube sphere data. For horizontal velocities, the data
% could be of the size [length(XL),length(YL),z-axis length], in which case
% you just need to take the mean over the longitude axis (always 1).
elseif isequal(slc,'Zon')
- if isequal(datasize(1:2),[faces*hres,hres])
+ if isequal(datasize(1:2),size(XC))
if isequal(flu,'O'), nBas = 0; end
if isequal(flu,'A'), nBas = 0; end
[data,dump1,dump2] = ...
@@ -153,11 +153,11 @@
data = data'; xax = XL; yax = YL;
elseif ismember(pst,{'Grd','Int'})
if isequal(pst,'Grd'),
- xax = XG(1:faces*hres,1:hres);
- yax = YG(1:faces*hres,1:hres);
+ xax = XG;
+ yax = YG;
elseif isequal(pst,'Int'),
- xax = XC(1:faces*hres,1:hres);
- yax = YC(1:faces*hres,1:hres);
+ xax = XC;
+ yax = YC;
end
elseif ismember(pst,{'Con','Cnf'})
data = cube2latlon(XC,YC,data,XL,YL)'; xax = XL; yax = YL;
| ViewVC Help | |
| Powered by ViewVC 1.1.22 |