% Converts ASCII files with bahtymetric data to netcdf files.
% The ASCII files with raw data format contains bathymetry for the baseline measurements at
% Mariakerke, the Belgiam coast.
% The data has been prepared for the MICORE project: www.micore.eu

% International Marine and Dredging Consultants, IMDC
% www.imdc.be
% Antwerp, Belgium
%
% Written by: Fernando Toro, Piet Haerens
%             fto@imdc.be
% Date: 02 November 2009
% Modified:
% Date:
javaaddpath('D:\Checkouts\OpenEarthTools\io\nctools\toolsUI-2.2.22.jar');
% Common input arguments
strInPath = fullfile('..','raw');
strOutPath = fullfile('..','netcdf');

% List of files to process

% vFiles = dir([strInPath,'*.txt']);
cInFile = {'MB_20081017.pts'; ...
           'MB_20081217.pts'; ...
           'MB_20090213.pts'; ...
           'MB_20090414.pts'; ...
           'MB_20090910.pts'; ...
           'SB_20081017.pts'};
cOutFile = {'MB_20081017.nc'; ...
           'MB_20081217.nc'; ...
           'MB_20090213.nc'; ...
           'MB_20090414.nc'; ...
           'MB_20090910.nc'; ...
           'SB_20081017.nc'};

% Make the job
for i=1:size(cInFile,1)
    strInFile = cInFile{i};
    strOutFile = cOutFile{i};
    bOK = bathy2netcdf(strInPath, strInFile, strOutPath, strOutFile);
end
