%t = jarkus_transects('areacode',7,'id',[7003575:7004000]);

t_i = jarkus_interpolatenans(t);
t_m = jarkus_merge(t);
t_mi = jarkus_interpolatenans(t_m, 'dim', 2);

figure;
subplot(2,2,1); pcolor(t.x, t.y, squeeze(t.altitude(end,:,:))); colorbar; shading flat; title('Original');
subplot(2,2,2); pcolor(t.x, t.y, squeeze(t_i.altitude(end,:,:))); colorbar; shading flat; title('Interpolated');
subplot(2,2,3); pcolor(t.x, t.y, squeeze(t_m.altitude(:,:))); colorbar; shading flat; title('Merged');
subplot(2,2,4); pcolor(t.x, t.y, squeeze(t_mi.altitude(:,:))); colorbar; shading flat; title('Merged and interpolated');

figure;
colormap(jet(length(t.time)))
pcolor(t.x, t.y, round(t_m.MERGED.sources/365)+1970); colorbar; shading flat; title('Origin years');

% egmond centre = +/- 3800
% egmond border = +/- 1.2km = +/- 3725/3850
% model border = +/- 2km = +/- 3575/4000