%-----------------------------------------------------------
function sbgrph(t,z)
  global im jm km lm
  
  g=p2s2ga(jm,im,z);
  gt=g';
  gt(im+1,:)=gt(1,:);
  gt(:,jm+1)=gt(:,1);

  st=num2str(t);
  stitle=strcat('t=',st);

  if exist('OCTAVE_VERSION') == 0
	% matlab
	contour(gt');
	title(stitle);
	drawnow;
  else
	% octave
	title(stitle);
	contour(gt);
  end

