%% RUNSCRIPT [matlab version: 7.6.0 (R2008a)]
% --------------------------------------------------
% input data
% - see below
%
% output data
% - ascii file of the same format
% - figure with the converted parameters [png format]
% ---------------------------------------------------

%% parameters
addpath(genpath('functions'));
run('d:\repositories\oetools\oetsettings');
clear all; close all; clc;
ldbfile = {'ldbs\noordwijk_RD.ldb','ldbs\lichteilandgoeree_RD.ldb','ldbs\eierlandsegat_RD.ldb'};

for ii=1:length(ldbfile)
    XY = landboundary('read',ldbfile{ii});
    s(ii).StartDate         = datenum(2013,01,01);
    s(ii).EndDate           = datenum(2013,05,19);
    s(ii).Loc.X             = XY(1,1);         %    80512;      % x-coordinates RD >> make sure it is in the model domain
    s(ii).Loc.Y             = XY(1,2);         %   476658;      % y-coordinates RD >> make sure it is in the model domain
    fprintf('Processing ''%s'' (x=%1.0f,y=%1.0f)\n',ldbfile{ii}(1:end-4),XY(1,1),XY(1,2));
    s(ii).OutputFile        = ['out\',ldbfile{ii}(6:end-4),'_short.asc'];          % name of outputfile
    Transform2(s(ii));
    s(ii).OutputFile        = ['out\',ldbfile{ii}(6:end-4),'_short_hcwd.asc'];          % name of outputfile
    Transform2hcwd(s(ii));
end

%% run
