function [vDate vH33 vGTZ] = readwaves2ColData(strPath, strInFile);
% function [vDate, vTime vH33 vGTZ] = readwaves2ColData(strPath, strInFile);
%
% Reads raw data with tide time series in the Belgiam coast.
% The data has been prepared for the MICORE project: www.micore.eu
% Raw data is in ASCII files and this function is called by another
% functions to convert these raw data files into netCDF format.
%
% #INPUTS:  -strPath: string with the directory path where the raw data is
%            saved. Relative paths are allowed, e.g. '../raw/19931115/'.
%            Include the / sign at the end of the string.
%           -strInFile: string with the name of the input ASCII file
%
% #OUTPUTS: -vDate: vector (n rowsx 1 col) with the dates in Serial Date Number Format 
%           -vDate: vector (n rowsx 1 col) with the times
%           -vH33: Significant wave height of the 1/3 of the highest waves
%           -GTZ: Average wave period
%
% #REMARKS: The format of the raw data ASCII file is:
%             - One line of comments
%             - First column date: dd/mm/yyyy
%             - Second column time: hh:mm 
%             - Third column H33 in decemeters.
%             - Fourth column GTZ
%               Nodata values are -999.00
%

% International Marine and Dredging Consultants, IMDC
% www.imdc.be
% Antwerp, Belgium
%
% Written by: Fernando Toro, Piet Haerens
%             fto@imdc.be
% Date: April 2011
% Modified:
% Date:

% Read values from file
path = fullfile(strPath, strInFile);
NumLines = 1;
strDelimiter = '/:|';
[B(:,1) B(:,2) B(:,3) B(:,4) B(:,5) vH33 vGTZ] = textread(path, ...
    '%d %d %d %d %d %f %f', 'headerlines', NumLines, 'delimiter',strDelimiter);
vDate = datenum(B(:,3), B(:,2), B(:,1), B(:,4), B(:,5), 0);
