aviso_file='../obs_aviso/lebanon/dt_med_allsat_msla_uv_20130101_20140704.nc';

Lon_ref=ncread('../obs_aviso/dt_ref_med_merged_madt_uv_20080102_20080102_20100503.nc','NbLongitudes');
Lat_ref=ncread('../obs_aviso/dt_ref_med_merged_madt_uv_20080102_20080102_20100503.nc','NbLatitudes');
Lon_ref=Lon_ref(end-86:end);
Lat_ref=Lat_ref(1:58);

Lon=ncread(aviso_file,'lon');
Lat=ncread(aviso_file,'lat');

u=ncread(aviso_file,'u');
v=ncread(aviso_file,'v');
u=double(u')*0.0001; %Transpose to have the same dim as ref
v=double(v')*0.0001;

[Lon2,Lat2]=meshgrid(Lon,Lat);
[Lon_ref2,Lat_ref2]=meshgrid(Lon_ref,Lat_ref);

ui=interp2(Lon2,Lat2,u,Lon_ref2,Lat_ref2);
vi=interp2(Lon2,Lat2,v,Lon_ref2,Lat_ref2);