x = nc_varget(ncfile, 'globalx');
y = nc_varget(ncfile, 'globaly');
g = xb_stagger(x, y);

% dzav = nc_varget(ncfile, 'dzav', [0 0 0], [45 -1 -1]);

%%
sumS = [];
for i = 1:size(sedero, 1)
%     sedero = nc_varget(ncfile, 'sedero', [i-1 0 0], [1 -1 -1]);
    S = g.dsz .* g.dnz .* squeeze(sedero(i,:,:))';
    sumS(i) = sum(S(:));
%     DZAV = g.dsz .* g.dnz .* squeeze(dzav(i,:,:))';
%     sumdzav(i) = sum(DZAV(:));
end
figure
plot(sumS)
