function nc_multibeam_from_asc2vaklodingen(basepath_local)
%NC_MULTIBEAM_FROM_ASC2VAKLODINGEN  rename tiles to rijskwaterstaat names
%
%See also: vaklodingen_definition,opendap_catalog, nc_multibeam_from_asc

N.fname = opendap_catalog(basepath_local);
D       = vaklodingen_definition;

%% match tiles with vaklodingen tiles

   for i=1:length(N.fname)
 
      ll             = textscan(filename(N.fname{i}),'%f','Delimiter','_');ll = ll{1};
      if length(ll)==0
       N.name{i}      = ''; % if already renamed ...
       fprintf(1,'skipped %54s%s \n',' ',filenameext(N.fname{i}))
      else
       N.xllcorner(i) = ll(1);
       N.yllcorner(i) = ll(2);
       ind            = find(D.xllcorner==ll(1) & D.yllcorner==ll(2));
       N.name{i}      = D.name{ind};
       fprintf(1,'vaklodingen%s % 7.0f % 6.0f renamed from %37s \n',N.name{i},N.xllcorner(i),N.yllcorner(i),filenameext(N.fname{i}))
      end
      
   end

%% rename to vaklodingen

   newdir = fileparts(N.fname{i});
   
   for i=1:length(N.fname)
       
      disp(['renaming ',num2str(i),' of ',num2str(length(N.fname))])
       
      if ~isempty(N.name{i})
   
      comment = nc_attget(N.fname{i},nc_global,'comment');
                nc_attput(N.fname{i},nc_global,'comment',[comment,', renamed afterwards: ',filename(N.fname{i}),' -> ','Vaklodingen',N.name{i},'.nc']);
      movefile          (N.fname{i},[newdir,filesep,'vaklodingen',N.name{i},'.nc']);
      
      end
   
   end   
   
% vaklodingenKB124_2322  130000  537500 renamed from 130000.00_537500.00_multibeam_data.nc 
% vaklodingenKB115_4544   40000  400000 renamed from  40000.00_400000.00_multibeam_data.nc 
% vaklodingenKB122_1716  110000  575000 renamed from 110000.00_575000.00_multibeam_data.nc 
% vaklodingenKB118_3534   70000  462500 renamed from  70000.00_462500.00_multibeam_data.nc 
% vaklodingenKB117_3736   60000  450000 renamed from  60000.00_450000.00_multibeam_data.nc 
% vaklodingenKB125_1514  140000  587500 renamed from 140000.00_587500.00_multibeam_data.nc 
% vaklodingenKB116_4746   50000  387500 renamed from  50000.00_387500.00_multibeam_data.nc 
% vaklodingenKB123_1716  120000  575000 renamed from 120000.00_575000.00_multibeam_data.nc 
% vaklodingenKB114_5150   30000  362500 renamed from  30000.00_362500.00_multibeam_data.nc 
% vaklodingenKB133_0706  220000  637500 renamed from 220000.00_637500.00_multibeam_data.nc 
% vaklodingenKB113_4948   20000  375000 renamed from  20000.00_375000.00_multibeam_data.nc 
% vaklodingenKB120_2322   90000  537500 renamed from  90000.00_537500.00_multibeam_data.nc 
% vaklodingenKB132_1312  210000  600000 renamed from 210000.00_600000.00_multibeam_data.nc 
% vaklodingenKB109_5150  -20000  362500 renamed from -20000.00_362500.00_multibeam_data.nc 
% vaklodingenKB121_2120  100000  550000 renamed from 100000.00_550000.00_multibeam_data.nc 
% vaklodingenKB122_2322  110000  537500 renamed from 110000.00_537500.00_multibeam_data.nc 
% vaklodingenKB115_4948   40000  375000 renamed from  40000.00_375000.00_multibeam_data.nc 
% vaklodingenKB137_0504  260000  650000 renamed from 260000.00_650000.00_multibeam_data.nc 
% vaklodingenKB118_3736   70000  450000 renamed from  70000.00_450000.00_multibeam_data.nc 
% vaklodingenKB119_4544   80000  400000 renamed from  80000.00_400000.00_multibeam_data.nc 
% vaklodingenKB119_3130   80000  487500 renamed from  80000.00_487500.00_multibeam_data.nc 
% vaklodingenKB121_2928  100000  500000 renamed from 100000.00_500000.00_multibeam_data.nc 
% vaklodingenKB136_0706  250000  637500 renamed from 250000.00_637500.00_multibeam_data.nc 
% vaklodingenKB130_1514  190000  587500 renamed from 190000.00_587500.00_multibeam_data.nc 
% vaklodingenKB122_1514  110000  587500 renamed from 110000.00_587500.00_multibeam_data.nc 
% vaklodingenKB121_2524  100000  525000 renamed from 100000.00_525000.00_multibeam_data.nc 
% vaklodingenKB112_4342   10000  412500 renamed from  10000.00_412500.00_multibeam_data.nc 
% vaklodingenKB114_4746   30000  387500 renamed from  30000.00_387500.00_multibeam_data.nc 
% vaklodingenKB115_5150   40000  362500 renamed from  40000.00_362500.00_multibeam_data.nc 
% vaklodingenKB112_4746   10000  387500 renamed from  10000.00_387500.00_multibeam_data.nc 
% vaklodingenKB128_1110  170000  612500 renamed from 170000.00_612500.00_multibeam_data.nc 
% vaklodingenKB120_1918   90000  562500 renamed from  90000.00_562500.00_multibeam_data.nc 
% vaklodingenKB139_1514  280000  587500 renamed from 280000.00_587500.00_multibeam_data.nc 
% vaklodingenKB115_4342   40000  412500 renamed from  40000.00_412500.00_multibeam_data.nc 
% vaklodingenKB139_0908  280000  625000 renamed from 280000.00_625000.00_multibeam_data.nc 
% vaklodingenKB136_0504  250000  650000 renamed from 250000.00_650000.00_multibeam_data.nc 
% vaklodingenKB138_0908  270000  625000 renamed from 270000.00_625000.00_multibeam_data.nc 
% vaklodingenKB113_4342   20000  412500 renamed from  20000.00_412500.00_multibeam_data.nc 
% vaklodingenKB133_0504  220000  650000 renamed from 220000.00_650000.00_multibeam_data.nc 
% vaklodingenKB134_0908  230000  625000 renamed from 230000.00_625000.00_multibeam_data.nc 
% vaklodingenKB126_1312  150000  600000 renamed from 150000.00_600000.00_multibeam_data.nc 
% vaklodingenKB114_4948   30000  375000 renamed from  30000.00_375000.00_multibeam_data.nc 
% vaklodingenKB137_1312  260000  600000 renamed from 260000.00_600000.00_multibeam_data.nc 
% vaklodingenKB134_0706  230000  637500 renamed from 230000.00_637500.00_multibeam_data.nc 
% vaklodingenKB115_3736   40000  450000 renamed from  40000.00_450000.00_multibeam_data.nc 
% vaklodingenKB120_3332   90000  475000 renamed from  90000.00_475000.00_multibeam_data.nc 
% vaklodingenKB119_3534   80000  462500 renamed from  80000.00_462500.00_multibeam_data.nc 
% vaklodingenKB118_3332   70000  475000 renamed from  70000.00_475000.00_multibeam_data.nc 
% vaklodingenKB120_2928   90000  500000 renamed from  90000.00_500000.00_multibeam_data.nc 
% vaklodingenKB133_0908  220000  625000 renamed from 220000.00_625000.00_multibeam_data.nc 
% vaklodingenKB134_0504  230000  650000 renamed from 230000.00_650000.00_multibeam_data.nc 
% vaklodingenKB110_4948  -10000  375000 renamed from -10000.00_375000.00_multibeam_data.nc 
% vaklodingenKB121_1918  100000  562500 renamed from 100000.00_562500.00_multibeam_data.nc 
% vaklodingenKB119_2524   80000  525000 renamed from  80000.00_525000.00_multibeam_data.nc 
% vaklodingenKB127_1716  160000  575000 renamed from 160000.00_575000.00_multibeam_data.nc 
% vaklodingenKB129_1312  180000  600000 renamed from 180000.00_600000.00_multibeam_data.nc 
% vaklodingenKB121_1716  100000  575000 renamed from 100000.00_575000.00_multibeam_data.nc 
% vaklodingenKB121_2322  100000  537500 renamed from 100000.00_537500.00_multibeam_data.nc 
% vaklodingenKB137_0908  260000  625000 renamed from 260000.00_625000.00_multibeam_data.nc 
% vaklodingenKB125_1110  140000  612500 renamed from 140000.00_612500.00_multibeam_data.nc 
% vaklodingenKB121_3130  100000  487500 renamed from 100000.00_487500.00_multibeam_data.nc 
% vaklodingenKB124_1312  130000  600000 renamed from 130000.00_600000.00_multibeam_data.nc 
% vaklodingenKB132_1514  210000  587500 renamed from 210000.00_587500.00_multibeam_data.nc 
% vaklodingenKB117_5150   60000  362500 renamed from  60000.00_362500.00_multibeam_data.nc 
% vaklodingenKB117_3534   60000  462500 renamed from  60000.00_462500.00_multibeam_data.nc 
% vaklodingenKB114_3938   30000  437500 renamed from  30000.00_437500.00_multibeam_data.nc 
% vaklodingenKB122_1918  110000  562500 renamed from 110000.00_562500.00_multibeam_data.nc 
% vaklodingenKB133_1110  220000  612500 renamed from 220000.00_612500.00_multibeam_data.nc 
% vaklodingenKB137_1716  260000  575000 renamed from 260000.00_575000.00_multibeam_data.nc 
% vaklodingenKB118_3130   70000  487500 renamed from  70000.00_487500.00_multibeam_data.nc 
% vaklodingenKB119_3736   80000  450000 renamed from  80000.00_450000.00_multibeam_data.nc 
% vaklodingenKB114_4544   30000  400000 renamed from  30000.00_400000.00_multibeam_data.nc 
% vaklodingenKB134_1312  230000  600000 renamed from 230000.00_600000.00_multibeam_data.nc 
% vaklodingenKB117_4544   60000  400000 renamed from  60000.00_400000.00_multibeam_data.nc 
% vaklodingenKB116_5150   50000  362500 renamed from  50000.00_362500.00_multibeam_data.nc 
% vaklodingenKB125_1312  140000  600000 renamed from 140000.00_600000.00_multibeam_data.nc 
% vaklodingenKB126_1514  150000  587500 renamed from 150000.00_587500.00_multibeam_data.nc 
% vaklodingenKB116_4342   50000  412500 renamed from  50000.00_412500.00_multibeam_data.nc 
% vaklodingenKB129_1514  180000  587500 renamed from 180000.00_587500.00_multibeam_data.nc 
% vaklodingenKB137_1514  260000  587500 renamed from 260000.00_587500.00_multibeam_data.nc 
% vaklodingenKB132_0706  210000  637500 renamed from 210000.00_637500.00_multibeam_data.nc 
% vaklodingenKB123_1918  120000  562500 renamed from 120000.00_562500.00_multibeam_data.nc 
% vaklodingenKB125_2120  140000  550000 renamed from 140000.00_550000.00_multibeam_data.nc 
% vaklodingenKB126_1110  150000  612500 renamed from 150000.00_612500.00_multibeam_data.nc 
% vaklodingenKB124_1514  130000  587500 renamed from 130000.00_587500.00_multibeam_data.nc 
% vaklodingenKB138_1514  270000  587500 renamed from 270000.00_587500.00_multibeam_data.nc 
% vaklodingenKB135_1110  240000  612500 renamed from 240000.00_612500.00_multibeam_data.nc 
% vaklodingenKB117_4746   60000  387500 renamed from  60000.00_387500.00_multibeam_data.nc 
% vaklodingenKB119_3332   80000  475000 renamed from  80000.00_475000.00_multibeam_data.nc 
% vaklodingenKB114_4140   30000  425000 renamed from  30000.00_425000.00_multibeam_data.nc 
% vaklodingenKB139_2120  280000  550000 renamed from 280000.00_550000.00_multibeam_data.nc 
% vaklodingenKB110_4746  -10000  387500 renamed from -10000.00_387500.00_multibeam_data.nc 
% vaklodingenKB117_4342   60000  412500 renamed from  60000.00_412500.00_multibeam_data.nc 
% vaklodingenKB127_1514  160000  587500 renamed from 160000.00_587500.00_multibeam_data.nc 
% vaklodingenKB139_1918  280000  562500 renamed from 280000.00_562500.00_multibeam_data.nc 
% vaklodingenKB116_4140   50000  425000 renamed from  50000.00_425000.00_multibeam_data.nc 
% vaklodingenKB125_1918  140000  562500 renamed from 140000.00_562500.00_multibeam_data.nc 
% vaklodingenKB120_2524   90000  525000 renamed from  90000.00_525000.00_multibeam_data.nc 
% vaklodingenKB137_0706  260000  637500 renamed from 260000.00_637500.00_multibeam_data.nc 
% vaklodingenKB119_2726   80000  512500 renamed from  80000.00_512500.00_multibeam_data.nc 
% vaklodingenKB140_1716  290000  575000 renamed from 290000.00_575000.00_multibeam_data.nc 
% vaklodingenKB118_4948   70000  375000 renamed from  70000.00_375000.00_multibeam_data.nc 
% vaklodingenKB132_1110  210000  612500 renamed from 210000.00_612500.00_multibeam_data.nc 
% vaklodingenKB139_0504  280000  650000 renamed from 280000.00_650000.00_multibeam_data.nc 
% vaklodingenKB136_1312  250000  600000 renamed from 250000.00_600000.00_multibeam_data.nc 
% vaklodingenKB118_3938   70000  437500 renamed from  70000.00_437500.00_multibeam_data.nc 
% vaklodingenKB120_3130   90000  487500 renamed from  90000.00_487500.00_multibeam_data.nc 
% vaklodingenKB116_4948   50000  375000 renamed from  50000.00_375000.00_multibeam_data.nc 
% vaklodingenKB123_1514  120000  587500 renamed from 120000.00_587500.00_multibeam_data.nc 
% vaklodingenKB120_3534   90000  462500 renamed from  90000.00_462500.00_multibeam_data.nc 
% vaklodingenKB117_4948   60000  375000 renamed from  60000.00_375000.00_multibeam_data.nc 
% vaklodingenKB138_1716  270000  575000 renamed from 270000.00_575000.00_multibeam_data.nc 
% vaklodingenKB136_0908  250000  625000 renamed from 250000.00_625000.00_multibeam_data.nc 
% vaklodingenKB126_1716  150000  575000 renamed from 150000.00_575000.00_multibeam_data.nc 
% vaklodingenKB111_5150       0  362500 renamed from      0.00_362500.00_multibeam_data.nc 
% vaklodingenKB135_0504  240000  650000 renamed from 240000.00_650000.00_multibeam_data.nc 
% vaklodingenKB130_1110  190000  612500 renamed from 190000.00_612500.00_multibeam_data.nc 
% vaklodingenKB124_1918  130000  562500 renamed from 130000.00_562500.00_multibeam_data.nc 
% vaklodingenKB111_4746       0  387500 renamed from      0.00_387500.00_multibeam_data.nc 
% vaklodingenKB123_2120  120000  550000 renamed from 120000.00_550000.00_multibeam_data.nc 
% vaklodingenKB139_0706  280000  637500 renamed from 280000.00_637500.00_multibeam_data.nc 
% vaklodingenKB134_1110  230000  612500 renamed from 230000.00_612500.00_multibeam_data.nc 
% vaklodingenKB137_1110  260000  612500 renamed from 260000.00_612500.00_multibeam_data.nc 
% vaklodingenKB125_1716  140000  575000 renamed from 140000.00_575000.00_multibeam_data.nc 
% vaklodingenKB118_5150   70000  362500 renamed from  70000.00_362500.00_multibeam_data.nc 
% vaklodingenKB138_0504  270000  650000 renamed from 270000.00_650000.00_multibeam_data.nc 
% vaklodingenKB128_1514  170000  587500 renamed from 170000.00_587500.00_multibeam_data.nc 
% vaklodingenKB136_1514  250000  587500 renamed from 250000.00_587500.00_multibeam_data.nc 
% vaklodingenKB116_4544   50000  400000 renamed from  50000.00_400000.00_multibeam_data.nc 
% vaklodingenKB109_4948  -20000  375000 renamed from -20000.00_375000.00_multibeam_data.nc 
% vaklodingenKB119_2928   80000  500000 renamed from  80000.00_500000.00_multibeam_data.nc 
% vaklodingenKB131_0908  200000  625000 renamed from 200000.00_625000.00_multibeam_data.nc 
% vaklodingenKB139_1716  280000  575000 renamed from 280000.00_575000.00_multibeam_data.nc 
% vaklodingenKB110_5150  -10000  362500 renamed from -10000.00_362500.00_multibeam_data.nc 
% vaklodingenKB118_2928   70000  500000 renamed from  70000.00_500000.00_multibeam_data.nc 
% vaklodingenKB115_4746   40000  387500 renamed from  40000.00_387500.00_multibeam_data.nc 
% vaklodingenKB129_1110  180000  612500 renamed from 180000.00_612500.00_multibeam_data.nc 
% vaklodingenKB112_4948   10000  375000 renamed from  10000.00_375000.00_multibeam_data.nc 
% vaklodingenKB131_1110  200000  612500 renamed from 200000.00_612500.00_multibeam_data.nc 
% vaklodingenKB120_2726   90000  512500 renamed from  90000.00_512500.00_multibeam_data.nc 
% vaklodingenKB136_1110  250000  612500 renamed from 250000.00_612500.00_multibeam_data.nc 
% vaklodingenKB135_0908  240000  625000 renamed from 240000.00_625000.00_multibeam_data.nc 
% vaklodingenKB115_4140   40000  425000 renamed from  40000.00_425000.00_multibeam_data.nc 
% vaklodingenKB113_4544   20000  400000 renamed from  20000.00_400000.00_multibeam_data.nc 
% vaklodingenKB123_2322  120000  537500 renamed from 120000.00_537500.00_multibeam_data.nc 
% vaklodingenKB122_2120  110000  550000 renamed from 110000.00_550000.00_multibeam_data.nc 
% vaklodingenKB114_4342   30000  412500 renamed from  30000.00_412500.00_multibeam_data.nc 
% vaklodingenKB112_4544   10000  400000 renamed from  10000.00_400000.00_multibeam_data.nc 
% vaklodingenKB127_1110  160000  612500 renamed from 160000.00_612500.00_multibeam_data.nc 
% vaklodingenKB116_3938   50000  437500 renamed from  50000.00_437500.00_multibeam_data.nc 
% vaklodingenKB132_0908  210000  625000 renamed from 210000.00_625000.00_multibeam_data.nc 
% vaklodingenKB124_1716  130000  575000 renamed from 130000.00_575000.00_multibeam_data.nc 
% vaklodingenKB128_1312  170000  600000 renamed from 170000.00_600000.00_multibeam_data.nc 
% vaklodingenKB135_1312  240000  600000 renamed from 240000.00_600000.00_multibeam_data.nc 
% vaklodingenKB113_4746   20000  387500 renamed from  20000.00_387500.00_multibeam_data.nc 
% vaklodingenKB118_4140   70000  425000 renamed from  70000.00_425000.00_multibeam_data.nc 
% vaklodingenKB126_1918  150000  562500 renamed from 150000.00_562500.00_multibeam_data.nc 
% vaklodingenKB117_4140   60000  425000 renamed from  60000.00_425000.00_multibeam_data.nc 
% vaklodingenKB121_2726  100000  512500 renamed from 100000.00_512500.00_multibeam_data.nc 
% vaklodingenKB111_4948       0  375000 renamed from      0.00_375000.00_multibeam_data.nc 
% vaklodingenKB118_4746   70000  387500 renamed from  70000.00_387500.00_multibeam_data.nc 
% vaklodingenKB115_3938   40000  437500 renamed from  40000.00_437500.00_multibeam_data.nc 
% vaklodingenKB116_3736   50000  450000 renamed from  50000.00_450000.00_multibeam_data.nc 
% vaklodingenKB123_1312  120000  600000 renamed from 120000.00_600000.00_multibeam_data.nc 
% vaklodingenKB131_1312  200000  600000 renamed from 200000.00_600000.00_multibeam_data.nc 
% vaklodingenKB138_0706  270000  637500 renamed from 270000.00_637500.00_multibeam_data.nc 
% vaklodingenKB132_0504  210000  650000 renamed from 210000.00_650000.00_multibeam_data.nc 
% vaklodingenKB130_1312  190000  600000 renamed from 190000.00_600000.00_multibeam_data.nc 
% vaklodingenKB127_1312  160000  600000 renamed from 160000.00_600000.00_multibeam_data.nc 
% vaklodingenKB120_2120   90000  550000 renamed from  90000.00_550000.00_multibeam_data.nc 
% vaklodingenKB111_4544       0  400000 renamed from      0.00_400000.00_multibeam_data.nc 
% vaklodingenKB135_0706  240000  637500 renamed from 240000.00_637500.00_multibeam_data.nc 
% vaklodingenKB118_4544   70000  400000 renamed from  70000.00_400000.00_multibeam_data.nc 
% vaklodingenKB117_3938   60000  437500 renamed from  60000.00_437500.00_multibeam_data.nc 
% vaklodingenKB138_1110  270000  612500 renamed from 270000.00_612500.00_multibeam_data.nc 
% vaklodingenKB133_1312  220000  600000 renamed from 220000.00_600000.00_multibeam_data.nc 
% vaklodingenKB131_1514  200000  587500 renamed from 200000.00_587500.00_multibeam_data.nc 
% vaklodingenKB124_2120  130000  550000 renamed from 130000.00_550000.00_multibeam_data.nc    
% 