function writecoastalindicatorfile_test()
% WRITECOASTALINDICATORFILE_TEST  One line description goes here
%
% More detailed description of the test goes here.
%
%
%   See also

%% Copyright notice
%   --------------------------------------------------------------------
%   Copyright (C) 2011 Deltares
%       Pieter van Geer
%
%       pieter.vangeer@deltares.nl
%
%       Rotterdamseweg 185
%       2629 HD Delft
%       P.O. 177
%       2600 MH Delft
%
%   This library is free software: you can redistribute it and/or
%   modify it under the terms of the GNU Lesser General Public
%   License as published by the Free Software Foundation, either
%   version 2.1 of the License, or (at your option) any later version.
%
%   This library is distributed in the hope that it will be useful,
%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
%   Lesser General Public License for more details.
%
%   You should have received a copy of the GNU Lesser General Public
%   License along with this library. If not, see <http://www.gnu.org/licenses/>.
%   --------------------------------------------------------------------

% This tools is part of <a href="http://OpenEarth.Deltares.nl">OpenEarthTools</a>.
% OpenEarthTools is an online collaboration to share and manage data and
% programming tools in an open source, version controlled environment.
% Sign up to recieve regular updates of this function, and to contribute
% your own tools.

%% Version <http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html>
% Created: 07 Dec 2011
% Created with Matlab version: 7.10.0.499 (R2010a)

% $Id$
% $Date$
% $Author$
% $Revision$
% $HeadURL$
% $Keywords: $

MTestCategory.WorkInProgress;

tijd = [2007, 2008, 2009, 2010, 2011];
rsp = [1684, 1694, 1703];
kustvak = [6, 6, 6];
indicatoren = {'test1', 'test2'};
waarden = [... indicator 1
    1,2,1,3,2;... 1684 (t)
    6,7,2,5,4;... 1694 (t)
    3,2,5,3,1];   %1703 (t)
waarden(:,:,2) = [... indicator 2
    2,2,3,2,1;...
    5,4,5,6,4;...
    3,3,2,4,2];

s = struct(...
    'kustvaknummer',kustvak,...
    'rsplocatie',rsp,...
    'time',tijd,...
    'indicatoren',[]);

s.indicatoren = struct(...
    'name',indicatoren{1},...
    'values',waarden(:,:,1));
s.indicatoren(2) = struct(...
    'name',indicatoren{2},...
    'values',waarden(:,:,2));

writecoastalindicatorfile('test.nc',s);

assert(exist('test.nc','file')==2);