function sphcolor3(field, lat, lon,num)

%plots spherical data on a robinson projection with continents

if max(lon)<=4
    error('input longitude should be in degrees')
end

if max(abs(lat))>90
    error('input order is wrong - input latitude vector before longitude vector')
end

field=squeeze(field);
a=size(field);
NN=a(1,1); N=a(1,2);

if length(lat)<NN | length(lat)>NN
    error('field size and latitude input must be same size')
end

if length(lon)<N | length(lon)>N
    error(' field size and longitude input must be same size')
end


colormap('jet')

LAT=lat;
load coast
figure(num); clf;
%'MapLonLimit',[min(lon) max(lon)],'FLonLimit',[min(lon) max(lon)],
axesm('robinson','MapLatLimit',[min(LAT) max(LAT)],'Origin', 0,'FLatLimit',[min(LAT) max(LAT)], 'ScaleFactor',1.5)
%axesm('robinson','MapLatLimit',[min(lat) max(lat)],'MapLonLimit',[min(lon) max(lon)], 'Origin', 0, 'FLatLimit',[min(LAT)-5 max(LAT)+5], 'FLonLimit',[min(lon) max(lon)],'ScaleFactor',1.5)
%framem;
plotm(lat,long, 'k');
lat=LAT; clear LAT



[LON,LAT]=meshgrid(lon,lat);
hold on;

%color_trans; colormap(cmap)
%caxis([-max(max(abs(field))) max(max(abs(field)))])
pcolorm(LAT, LON, field)
colorbar;
tightmap2;

%fill_landmap('over', 0.5*[1 1 1]);  %makes land grey