function plotData=plotCollocatedData(collocatedData,modisData,modisLat,modisLon,axDisplay)
% plots collocated data for existing MODIS output
% should be ellipses of MODIS data on the AIRS grid
% Input: collocated data as supplied from collocate program
%        MODIS data as it exists from Level 1B data
% Kevin Baggett
% Tue Mar 11 17:16:57 CST 2003
modisData=modisData';% flip MODIS data on its side as output from Nagle routine
modisLat=modisLat';
modisLon=modisLon';
[x,y]=size(modisData);
plotData=ones(x,y)*NaN; 
plotLat=ones(x,y)*NaN;
plotLon=ones(x,y)*NaN;
for i=1:length(collocatedData)
	try %sometimes not all MODIS data is available
		plotData(collocatedData{i}.modisIndx)=...
			modisData(collocatedData{i}.modisIndx);
		plotLat(collocatedData{i}.modisIndx)=...
			modisLat(collocatedData{i}.modisIndx);
		plotLon(collocatedData{i}.modisIndx)=...
			modisLon(collocatedData{i}.modisIndx);
	catch
	end
end
clear modis*;

axes(axDisplay);
cla;
%axesm('mercator');
% plot the coastline
%load coast;
%plotm(lat,long,'m');
%surfm(plotLat,plotLon,plotData);
imagesc(plotData);
