function [] = plot_sections(fname1, fname2, varname)

    if ~exist(fname1, 'file')
        error(sprintf('\n  error: could not open file \"%s\"\n', fname1));
    end
    
    if ~exist(fname2, 'file')
        error(sprintf('\n  error: could not open file \"%s\"\n', fname2));
    end
    
    nc = netcdf(fname1);
    v1 = nc{varname}(:);
    scale_factor = nc{varname}.scale_factor(:);
    if ~isempty(scale_factor)
        v1 = v1 * scale_factor;
    end
    add_offset = nc{varname}.add_offset(:);
    if ~isempty(add_offset)
        v1 = v1 + add_offset;
    end
    depth1 = nc{'depth'};
    close(nc);
    v1 = squeeze(v1);
    
    nc = netcdf(fname2);
    v2 = nc{varname}(:);
    scale_factor = nc{varname}.scale_factor(:);
    if ~isempty(scale_factor)
        v2 = v2 * scale_factor;
    end
    add_offset = nc{varname}.add_offset(:);
    if ~isempty(add_offset)
        v2 = v2 + add_offset;
    end
    depth2 = nc{'depth'};
    close(nc);
    v2 = squeeze(v2);
    
    warning off;
    figure;
    subplot(1, 2, 1);
    pcolor_ps(v1);
    shading flat;
    clim = caxis;
    subplot(1, 2, 2);
    pcolor_ps(v2);
    shading flat;
    caxis(clim);
    colorbar;
    
    %set(gcf, 'renderer', 'zbuffer');
    
    print -depsc2 'sections.ps'
    
    return
    