%clear
%close all

ncload('../../AVISO/adt_week_SA.cdf')
[area,dx,dy]=sw_area(NBLONGITUDESN179_61,NBLATITUDES307_413);

ilat = 87; %23S
ilon = 60:66;%70;
dx= dx(ilat,ilon);

for ii=1087:-1:1   
  adt = squeeze(ADT(ii,:,:)); 
[u,v] = geovel_from_sla(NBLONGITUDESN179_61,NBLATITUDES307_413,adt);
v = v(ilat,ilon)/100;  % in meters
vm = v(find(v<0));
BC_2D(ii) = nansum(v.*dx);
BC_2DM(ii) = nansum(vm.*dx(1));
end
clear adt ADT vm v u 

%Start in 1993
BC_2D = BC_2D(13:end);
BC_2DM = BC_2DM(13:end);
TIME = TIME(13:end);

%figure,plot(BC_2D)
%figure,plot(BC_2DM)

