function [apresd,mask,depth,latitude,yfrac]=load_SLA

%function plot_OHC(num)
addpath /WSmounts/phodnet/share/mgoes/matlab2/Time_transform/       
addpath /data/mgoes/matlab/timeplt
addpath /data/mgoes/matlab/Seawater
addpath /data/mgoes/matlab/drtoolbox/

    suffix = 'MOCSTRESS_NA';
    suffix = 'MOCHEAT_NA';
%    suffix = 'MOCWATER_NA';
   A_apress = [];
for ii=1:3
   filename = sprintf('%s%s%i.nc',suffix,'_part',ii);%    _part1.nc
   moc      = ncread(filename,'MOC');
   A_apress = cat(3,A_apress,moc);
end
latitude  = double(ncread(filename,'YU_OCEAN122_245'));
depth     = double(ncread(filename,'ST_OCEAN'));
z_bnds    = double(ncread(filename,'ST_OCEAN_bnds'));
time      = double(ncread(filename,'TIME'));
time = 1:size(A_apress,1);
yfrac = 1:length(time);


disp('Load Data')

disp('NORTH ATLANTIC')
[nx,ny,nt] = size(A_apress);

apresm = A_apress*nan;
disp('INTERP')
for jj=1:12
    ii = jj:12:nt;
    aux = mean(A_apress(:,:,ii),3);
    apresm(:,:,ii) = aux(:,:,ones(1,length(ii)));
   
end 
apressa = A_apress-apresm;
apressa = permute(apressa,[3 2 1]);

%PACIFIC AREA
oo = std(apressa);
%apressa(:,oo==0)=nan;

clear apresm A_apress oo


%keyboard
disp('Anomalies')
mask = ~isnan(squeeze(apressa(1,:,:)));
if 0
dz=diff(z_bnds);
dy_deg = gradient(latitude);
dy = 4.e7*dy_deg/360;
W = dy*dz;
W = W'.*mask;
W=W./max(W(:));
W = shiftdim(W,-1);
apressa=apressa.*W(ones(1,nt),:,:);
end
apresd = map2mat(mask,apressa);%*100;

%PREWHITEN
if 0
for ii = 1:size(apresd,2)
      aux = apresd(:,ii);
      if ~isnan(aux)
      apresd(:,ii) = prewhiten(aux);
      end
end
end

apresd(isnan(apresd))=0;

