function [ output_args ] = make_bck( aviso_netcdf_file_bck, aviso_netcdf_file_next, Nlat, Nlong, nbofdays, steptime )

%%%%%%%%%% This code takes the date of the biginning and the end of the
%%%%%%%%%% assimilation and gets the velocity fields at the beginning and
%%%%%%%%%% the end times. It also takes the nb of step times in HOURS and it
%%%%%%%%%% interpolates between the the first and the last time to get the
%%%%%%%%%% velocity field at each step time. Finally, it gives  a file
%%%%%%%%%% containing a list of the velocity fields at each time so we can
%%%%%%%%%% use it in our YAO code afterwards.


read_aviso( aviso_netcdf_file_bck, aviso_netcdf_file_next, Nlat, Nlong, nbofdays )

load ../obs_float/uzero.dat
load ../obs_float/vzero.dat
load ../obs_float/unext3d.dat
load ../obs_float/vnext3d.dat


outfile='../obs_float/vel_bck_all.dat';
format long
uinit='../obs_float/uzero.dat';
vinit='../obs_float/vzero.dat';
ufin='../obs_float/unext3d.dat';
vfin='../obs_float/vnext3d.dat';
fid=fopen(outfile,'w');

count=nbofdays*24/steptime;

for i=1:count
    
    
    time_step=i;
ubck=load(uinit);
vbck=load(vinit);
unex=load(ufin);
vnex=load(vfin);

 vel_bck=zeros(size(ubck,1),5);

 vel_bck(:,1)=time_step;
 vel_bck(:,2)=ubck(:,2);
 vel_bck(:,3)=ubck(:,3);
 vel_bck(:,4)=ubck(:,4)+(unex(:,4)-ubck(:,4))*i/count;
 vel_bck(:,5)=vbck(:,4)+(vnex(:,4)-vbck(:,4))*i/count;



 fprintf(fid,'%d %d %d %f %f\n',vel_bck');

 

end

 fclose(fid);


end

