%%
tr = jarkus_transects('url', '..\data\jarkus.nc', 'output', {'id'});
ID = tr.id;
for id = ID
    tr = jarkus_transects('url', '..\data\jarkus.nc', 'id', id);
    
    ncfile = '..\data\jarkus_volumes.nc';
    csb = nc_varget(ncfile, 'cross_shore_boundary',...
        [find(ismember(nc_varget(ncfile, 'id'), id))-1 0], [1 -1]);

    fh = figure(...
        'Units', 'centimeters',...
        'Position', [1 1 15 25],...
        'PaperPositionMode', 'auto');

    subplot(2,1,1);
    jarkus_plot_transect(tr);
    legend off;
    vline(csb)
    set(gca,...
        'XLim', [min(csb) max(csb)])
    
    v = axis;
    for icsb = 1:length(csb)-1
        text(mean(csb(icsb+(0:1))), v(3), sprintf('%i', icsb),...
            'HorizontalAlignment', 'center',...
            'VerticalAlignment', 'bottom')
    end
    
    ax = subplot(2,1,2,...
        'nextplot', 'add');
    ph = desb_barplot_volumes('id', id);
end