function plot_TLFF
% program to read nspe ram output and plot full field this assumes you have
% run nspefld.exe to make the fld3c.out file
% josie fabre, NRL, Feb 04
% modified by John Joseph, NPS Ocean Acoustics Lab (May 2010)
% modified by JEJ, NPS OAL (Jan 2011) changed colorbar
%--------------------------------------------------------------
% Read the full filed TL output file and organize data
gfilename = '.\fld3c.out';
fid = fopen(gfilename,'r');
test = fscanf(fid,'%f%f%f',[3,inf]); 
fclose(fid);
test = test'; test(:,3) = -test(:,3);
x = unique(test(:,1));
y = unique(test(:,2));
z = reshape(test(:,3),[length(y),length(x)]);

% plot figure
figure('WindowStyle','docked');
pcolor(x./1000,sort(-y),z);
hold on
shading interp
caxis([35 100]);
tej = flipud( jet( 256 ) );  % 'jet' colormap reversed
colormap( tej );
colorbar; grid on;
xlabel('Range (km)')
ylabel('Depth (m)');
set(gca,'YDir','reverse','layer','top');
title('full-field TL');
hold off
