function varargout = fnv_plot_wadsea_transects(varargin)
%FNV_PLOT_WADSEA_TRANSECTS  One line description goes here.
%
%   More detailed description goes here.
%
%   Syntax:
%   varargout = fnv_plot_wadsea_transects(varargin)
%
%   Input: For <keyword,value> pairs call fnv_plot_wadsea_transects() without arguments.
%   varargin  =
%
%   Output:
%   varargout =
%
%   Example
%   fnv_plot_wadsea_transects
%
%   See also

%% Copyright notice
%   --------------------------------------------------------------------
%   Copyright (C) 2014 Deltares
%       Joost den Bieman
%
%       joost.denbieman@deltares.nl
%
%       P.O. Box 177
%       2600 MH Delft
%       The Netherlands
%
%   This library is free software: you can redistribute it and/or modify
%   it under the terms of the GNU General Public License as published by
%   the Free Software Foundation, either version 3 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 General Public License for more details.
%
%   You should have received a copy of the GNU General Public License
%   along with this library.  If not, see <http://www.gnu.org/licenses/>.
%   --------------------------------------------------------------------

% This tool is part of <a href="http://www.OpenEarth.eu">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: 29 Sep 2014
% Created with Matlab version: 8.2.0.701 (R2013b)

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

%% Settings
OPT = struct(   ...
    'jarkus_url', 'http://opendap.deltares.nl/thredds/dodsC/opendap/rijkswaterstaat/jarkus/profiles/transect.nc',...
    'JarkusID',     []  ...
);

OPT = setproperty(OPT, varargin{:});

%% Get IDs
ids             = nc_varget(OPT.jarkus_url,'id');
WadseaFilter    = ids > 2000000 & ids < 7000000;

fnv_transects2nc('fname', '../data/wadsea_2012.xyz','id',ids(WadseaFilter));
fnv_transects2nc('fname', '../data/wadsea_2035.xyz','id',ids(WadseaFilter));

alt_2012 = nc_varget('transects_2012.nc','altitude');
alt_2035 = nc_varget('transects_2035.nc','altitude');

diff = alt_2012 - alt_2035(1,:,:);

alt_2012 = nc_varget('transects_2012.nc','altitude_model');
alt_2035 = nc_varget('transects_2035.nc','altitude_model');

diff = alt_2012 - alt_2035(2,:,:);
pcolor(squeeze(diff));
shading interp