function zonation_test

% Read transect
% Apply zonation
%   - total volume from -8 until + 3 at the dunefoot.
%   - underwater zone from -8 until 0
%   - beach zone from 0 until top of base dune
%   - dune valley zone from top of base dune to dune foot

k=1;

profile = 8;

%% Volume 1
upper_boundary = 0; %(NAP)
lower_boundary = -8; %(NAP)

year = 2009;
for month = 7:12;
    [cross_shore,altitude] = combine_surveys(year,month);
    volume(k) = jarkus_getVolume(cross_shore, altitude(:,profile),...
        upper_boundary, lower_boundary, [], []);
    k=k+1;
end

year = 2010;
for month = 1:4;
    [cross_shore,altitude] = combine_surveys(year,month);
    volume(k) = jarkus_getVolume(cross_shore, altitude(:,profile),...
        upper_boundary, lower_boundary, [], []);
    k=k+1;
end

% Compare volumes time series.
figure;
bar(volume)

%% Determine dune top

%% Volume 2
upper_boundary = 0; %(NAP)
lower_boundary = -8; %(NAP)

year = 2009;
for month = 7:12;
    [cross_shore,altitude] = combine_surveys(year,month);
    volume(k) = jarkus_getVolume(cross_shore, altitude(:,profile),...
        upper_boundary, lower_boundary, [], []);
    k=k+1;
end

year = 2010;
for month = 1:4;
    [cross_shore,altitude] = combine_surveys(year,month);
    volume(k) = jarkus_getVolume(cross_shore, altitude(:,profile),...
        upper_boundary, lower_boundary, [], []);
    k=k+1;
end

% Compare volumes time series.
figure;
bar(volume)